Errata
This is the errata page for the second edition of Grokking Algorithms. If you see an error, please send me an email.
Chapter 4
On page 59, I say, "sneak peak at functional programming". It should be "sneak peek".
Chapter 5
On page 94, I say "once your load factor is greater than .07". It should be 0.7.
Chapter 7
Page 133: In this Huffman coding example, I use stat
to show the number of bytes in a file. I say the command returns 4 bytes, but you may see 5 instead. This is because unix will add a newline (00001010
, or '\n'
) automatically at the end.
Also, if stat -f%z test.txt
gives you an error, try stat --format=%s test.txt
.
Chapter 10
Page 191: For the "in this chapter" section, the first and last bullet are the same.
Chapter 12:
Page 240: In the example involving bread, I calculate the distance from (4, 1, 0) to 6 different examples, A, B, C, D, E, and F. The distances are shown on the top of page 240. These distances should actually be the square root of the numbers shown in the book.
Appendix A: Performance of AVL trees
On Page 266, I say "a perfectly balanced tree of height ... 2 has 7 nodes (32 + 1), of height 3 has 15 nodes (72 + 1), etc."
It should be (3*2 + 1)
and (7*2 + 1)
, respectively.