Join Raghavendra Dixit for an in-depth discussion in this video Time complexity: Open addressing, part of Introduction to Data Structures & Algorithms in Java.
- [Instructor] Let's look at the time complexity…for searching or inserting a record…in a hash table using open addressing.…And here our assumption is that hashing is uniform.…And what that means mathematically is that…if we have a hash function h…and a hash table of size m,…then the probability that two non equal keys…will hash to the same slot is one by m, all right?…That is any key being hashed to a slot…is equally likely independent of the other keys…which may already have been put into the table.…
With that assumption, in the worst case…the time complexity is clearly order of n.…And why is that?…Well, because in the worst case we may have to…go over each slot of the area or the table…until we get the item we are looking for…or get an empty slot for the new record to be inserted.…So the worst case is not very interesting,…it's kind of bad.…But on an average hash tables are very fast…data structures for inserting and finding items, all right?…So that's what we'll discuss here,…the average case time complexity.…
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.