Skip to content

Latest commit

 

History

History
7 lines (6 loc) · 510 Bytes

algorithm.md

File metadata and controls

7 lines (6 loc) · 510 Bytes

In this program, we use casting & hahsing by chaining.

We will be using prime numbers here, table size is prime number because it is best suited. h(K) = K mod M K is the key, M the size of the table set up array of links (a table), indexed by the keys, to lists of items with same key. A hash function maps to keys to array indicates buckets. The hash function hashes using first two letters, words with same first two letters go in one bucket and words with same first letter hashed in different bucket.