Cheat sheets

ALG-10Cheat sheet1 pageIn a paid pack

Hash Functions and Chaining

Direct addressing versus hashing; the load factor; division and multiplication hash functions with worked values and the reason to avoid powers of two; universal hashing; the simple uniform hashing assumption; separate chaining with its insert, search and delete costs, expected comparisons for successful and unsuccessful search and the worst case; the solved GATE CS 2026 Set 2 Q.30 drawn as a chained table; collision probabilities, expected empty slots and colliding pairs; chaining compared with open addressing.

Diagrams from ALG-10

ALG-11Cheat sheet1 pageIn a paid pack

Open Addressing: Probing and Deletion

Linear, quadratic and double hashing probe sequences and the conditions for visiting every slot; one key set inserted three ways into an 11-slot table with every probe counted; primary and secondary clustering; expected probes under uniform hashing and for linear probing at three load factors; deletion with tombstones and what goes wrong without them; quadratic probing coverage with a prime table size; the solved GATE CS 2026 Set 1 Q.24. Every table comes from a script.