Join Raghavendra Dixit for an in-depth discussion in this video Strategies for open addressing, part of Introduction to Data Structures & Algorithms in Java.
- [Instructor] There are many strategies for using…open addressing, and we will discuss a couple of them here.…One of the simplest ways to use what…is called linear probing, alright?…In this we start from a base probe step,…that is the probe step is zero.…And we hit an index, say index three, as shown here.…If this index is already full we just go to the next index,…which is index four, and if this index is full,…we go to the next step.…
So we keep increasing the index linearly from the base index…until we hit an empty slot, where we insert the record.…So if you want to write this as an expression,…we can write it like this.…Hashing the key in probe step I is same as hashing it…in the zero probe step, which is the base,…and then just add I to it.…By the way we can choose any other linear function…of I, rather than just I.…
But for the example, I is a good enough candidate…for the linear function in I.…Now the problem with linear probing…is there to could be clustering of records in regions…of hash table, and if that happens,…
Note: This course was created by Packt Publishing. We are pleased to host this training in our library.
- Why study data structures and algorithms?
- How to calculate the time complexity
- Using Big O notation
- Using basic sorting and search algorithms
- Searching elements in unordered arrays and ordered arrays
- Implementing a linked list in Java
- Implementing stacks using arrays
- Queues using arrays
- Binary search trees
- Representing heaps using arrays
Skill Level Intermediate
1. Introduction to Algorithms
2. Analysis of Algorithms
3. Basic Sorting and Search Algorithms
4. Linked Lists
5. Stacks and Queues
7. Binary Search Trees
8. More Sorting Algorithms
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.