algoritmauzmanı
Sign in
TREN
Part 9

Hashing

18lessons2 h 9 min0done

Hashing turns a key straight into an address in an array with a hash function. Search, insertion and deletion then take constant time on average; dictionaries, sets, caches and database indexes rest on this idea.

The part starts with hash functions, then handles collisions, where two keys land in the same place, in two ways: open addressing, which looks for a free cell inside the array, and separate chaining, which keeps a linked list in every bucket. It then covers growing the table and built-in hash tables, and ends with exam questions.

Lesson 9.0 What is hashing?6 min