We were unable to load Disqus. If you are a moderator please see our troubleshooting guide.
Great summary about Python dictionaries, I really enjoyed reading.
A few (minor) remarks:
* In the snippet about linear probing, shouldn't it be `++i` in order to yield the correct index (i.e. `if(table[++i] == EMPTY]) return i`.
* In the text following the random probing snippet, where you describe `perturb` might reach zero at some point, the line `mask & i*5 + 1` misses the parentheses, i.e. it should be `mask & (i*5 + 1)`.
* In the text right before the "Resizing the dictionary" section, you write that "This probing sequence continues until an available index is found, which is guaranteed because there are always empty spaces." However another important requirement is that, even if `perturb` reaches zero, the update `i = mask & (i*5 + 1)` doesn't enter a cycle of length smaller than `mask+1` (for `mask = pow(2, n) - 1` and `i <= mask`). This isn't obvious and if the update rule used another multiplication factor, e.g. `4`, then the requirement would not be met.
Thanks I'm glad you enjoyed it. I've updated the post to address your comments.
Great post.
Pretty clear and easy to read!