You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: courses/algorithms/02-analysis/README.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
Before starting, lets thin about 3 problems:
4
4
5
-
For an array of size N, dont overthink. think and answer:
5
+
For an array of size $N$, dont overthink. Just answer:
6
6
7
7
1. How many iterations a loop run to find a specific number inside an array? (naively)
8
8
2. How many comparisons should I make to find two numbers in an array that sum a specific target? (naively)
@@ -119,7 +119,7 @@ To simplify, we remove the constants and the lower order terms:
119
119
120
120
## Common Big Os
121
121
122
-
!!! note inline end "Log"
122
+
!!! note inline end "Logarithm"
123
123
124
124
In computer science, when we say log, assume base 2, unless expressely stated;
125
125
@@ -133,7 +133,7 @@ To simplify, we remove the constants and the lower order terms:
133
133
| O(c^n) | Exponential | brute force password of size n |
134
134
| O(n!) | factorial | list all combinations |
135
135
136
-
### What is log?
136
+
### What is logarithm?
137
137
138
138
Log is the inverse of exponentiation. It is the number of times you have to multiply a number by itself to get another number.
139
139
@@ -163,4 +163,4 @@ In a binary search, we commonly divide the array in half (base 2), and check if
163
163
## Common Issues and misconceptions
164
164
165
165
- Big O and Theta are commonly mixed;
166
-
- Hashtables: it is commonly assumed that queries on <map> or <set> being O(1); std:: `<map>` and `<set>` are not the ideal implementation! [Watch this CppCon video](https://www.youtube.com/watch?v=ncHmEUmJZf4) for some deep level insights;
166
+
- Hashtables: it is commonly assumed that queries on `<map>` or `<set>` being `O(1)`; std:: `<map>` and `<set>` are not the ideal implementation! [Watch this CppCon video](https://www.youtube.com/watch?v=ncHmEUmJZf4) for some deep level insights;
0 commit comments