Join Raghavendra Dixit for an in-depth discussion in this video The hash function, part of Introduction to Data Structures & Algorithms in Java.
- [Instructor] The main idea of hashing is that,…for any object which is acting as a key,…we find some numeric representation of it…and then hash it so that we can get to a slot in the array…to be able to insert the data associated with that key.…A good hash function should be able to distribute…the keys uniformly into the slots of the array.…And the keys themselves are natural numbers.…Possibly, large natural numbers, which when hashed,…can map to an index of the array, all right?…For example, if you want to hash this string,…hash itself, you must first get to a natural number…representation of it, all right?…So, how can we do that?…Well, we can choose the key values of each letter…and then maybe add them up.…
But this won't be a great way to get to a natural number…because many character sequences…may arrive at this same number.…Although we would like this number to be large…and sort of unique, that is, at the minimum,…there may not be many character sequences…which may (mumbling) to the same number…at least under these (mumbling) assumptions.…
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.