Cuckoo hashing is a simple and elegant method for collision-resolution in hash tables. The resulting dictionary data structure is easy to implement, quite efficient in practice and it is also interesting theoretically (there are several interesting open questions about its properties).
I made a small visualization of how Cuckoo hashing works. The demo uses JavaScript and HTML5 Canvas, so it should work in most browsers. Let me know if you find it useful or if you have any feedback.
The demo is loosely inspired by Jason Davies’ Bloom filter visualization. Here is my old post about Bloom filters.
3 comments ↓
Some discussion on reddit:
http://www.reddit.com/r/programming/comments/2jz97p/show_reddit_visualization_of_cuckoo_hashing/
Hi! Nice visualization!
I stumbled upon your website while searching some implementations of count min sketch : )
Nice website, especially posts about books you read. I often think about describing books I read but never find it enough interesting to invest some time on it.. I saw the cover of Omon Ra and was surprised somebody read it in english. I read in in Russian and like it a lot : )
Grüß aus Hannover : )
Hi Daria! thanks for the comment. Yes, I liked Omon Ra a lot – I received it as a gift from a Russian friend.
Leave a Comment