Hashing and hash tables
↑A hash function maps keys to bucket candidates. Real tables need collision handling, equality checks and resize rules. Learn these mechanisms before trusting an expected O(1) lookup guarantee.
Lessons and practical examples
Section titled “Lessons and practical examples”-
Build a hash table in C#: Implement a generic chaining hash map, lookup, removal and resizing.
-
Hash functions, buckets and collisions: Hashing maps a key to a hash code and then to a bucket index.
-
Hash tables: Learn hashing, buckets and collisions with a working simulator.
-
HashSet vs Dictionary vs Hashtable: Choose a collection based on values, keys and equality semantics.
-
Open addressing and linear probing: Handle collisions in a slot array without chaining.
-
Load factor, resizing and performance: Understand expected O(1), rehashing and worst-case costs.
How to study this section
Section titled “How to study this section”Start with one concept, work through a small example, and verify your prediction. Follow linked topics when a prerequisite or related idea needs more explanation.
