Page 111 - Data Structures Handout_Neat
P. 111

the load factor increases, leading to more collisions.


                         9.5.2  Average Case vs Worst Case Performance


                         •  Average Case: With a good hash function and moderate load factor, insertion,

                            deletion, and search operations take   (1)time.
                         •  Worst Case: If many collisions occur (e.g., poor hash function or very high load

                            factor), operations degrade to   (  ), because searching may require scanning

                            multiple slots or traversing long chains.
                       Example: Demonstrating Worst Case with Poor Hash Function






























































                                                            111
   106   107   108   109   110   111   112   113   114   115   116