Summary
In this chapter, we explored the fundamental concepts of search and search algorithms, beginning with an overview of linear and sub-linear search methods. We examined how linear search, despite its simplicity and ease of implementation, has limitations in efficiency, especially for large datasets. We then discussed sub-linear search algorithms, such as binary search, jump search, and interpolation search, highlighting their improved time complexities and discussing the conditions under which they performed best.
Lastly, we introduced the concept of hashing and its critical role in achieving constant time complexity for search, insert, and delete operations. We covered different hashing methods, including division-remainder, multiplication, mid-square, and universal hashing, explaining how each method worked and their respective strengths and weaknesses.
We also discussed various techniques for handling collisions, such as linear probing, quadratic probing, double hashing...