Skip to content

Commit d75f80c

Browse files
authored
Merge pull request #18 from rbanffy/master
Fix typo
2 parents 52ab328 + 0503d59 commit d75f80c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/hitchhiker.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Let's look at each of these in some detail.
1313
You might remember an important theorem from data structures: the best-performing data structure for looking up sorted keys cannot do those queries faster than `O(log(n))`.
1414
Since sorted trees provide a solution for this, we'll start with them.
1515
Now, a common sorted tree for this purpose is the Red-Black tree, whose actual query performance is between `log~2~(n)` and `2*log~2~(n)` (the write performance is `log~2~(n)`).
16-
The factor of 2 comes from the partial imbalances (which are still asymtotically balanced) that the algorithm allows, and the base 2 of the log comes from the fact that it's a binary search tree.
16+
The factor of 2 comes from the partial imbalances (which are still asymptotically balanced) that the algorithm allows, and the base 2 of the log comes from the fact that it's a binary search tree.
1717

1818
A less popular sorted tree is the AVL tree--this tree achieves `log~2~(n)` query performance, at the cost of always paying `2*log~2~(n)` for inserts.
1919
We can already see a pattern--although many trees reach the asymptotic bound, they differ in their constant factors.

0 commit comments

Comments
 (0)