In this video, we learn how to implement a hash table in Python using quadratic probing for collision resolution. We begin with a quick review of linear probing from the previous tutorial, then modify the program to use the quadratic probing formula.
Step-by-step, we understand how to update the insert, search, and delete functions, initialize and increment variables, and apply conditions to prevent infinite loops when the table is full. By the end, we see how the hash table behaves after insertion, searching, and deletion using this method.
Continue this lesson in the app
Install CourseHive on Android or iOS to keep learning while you move.