Hashing O(1) lookup? Explained

preview_player
Показать описание
This video explains the idea behind hashing and why data structures that use hashing produce o(1) looks ups. How these three search algorithms compare against each other in terms of time complexity or number of operations!

Linear Search O(n)
Binary Search O(log n)
HashSet O(1) or constant time
Рекомендации по теме
Комментарии
Автор

Hash function takes integer as input and will output memory address where that integer can be fetched from. Here by index I mean memory address.

pixel_yogi
Автор

Great video, I was looking for the answer of this specific question for so long. Finally found it

sanskartiwari
Автор

Ok but I imagine there are specific hash functions needed for different key data types, and each of those will have their own limitations and overhead.

closingtheloop