Hash table linear probing

  Рет қаралды 43,072

WilliamFiset

WilliamFiset

Күн бұрын

Пікірлер: 29
@manhhiep1627
@manhhiep1627 4 жыл бұрын
best explanation ever. this channel is so underrated
@brunokawka
@brunokawka 2 жыл бұрын
Your explanations are truly fantastic; concise and crystal clear with the readable and consistent design system
@Indian73641
@Indian73641 2 жыл бұрын
I was struggling to understand prime number requirement, you explained so clearly…Thank You
@augustina3657
@augustina3657 2 жыл бұрын
Oh thank god. I've been looking everywhere for something like this
@pushkar260
@pushkar260 6 жыл бұрын
b will be obselete, because it's not doing anything. If there is a cycle the cycle will just be offseted by the value 'b' and thus has no real effect
@User-cv4ee
@User-cv4ee 5 жыл бұрын
offset by b or (b mod n)
@aparup53
@aparup53 4 жыл бұрын
@@User-cv4ee b mod N
@daumtto
@daumtto Жыл бұрын
Thanks bruh
@brooklynwright7109
@brooklynwright7109 4 жыл бұрын
thank you so so much for your crystal clear explanations! they were super useful :) keep up with the good work
@ioanacrisan3684
@ioanacrisan3684 7 ай бұрын
Thank you for these series!
@svrmmb
@svrmmb 11 ай бұрын
The reason b is sometimes referred to as "obsolete" is that it doesn't contribute to the generation of distinct probe sequences as much as a does. The offset b is often considered a constant that can be adjusted, but it doesn't affect the periodicity of the probe sequence.
@jadalhamwi1543
@jadalhamwi1543 4 жыл бұрын
About b Obsoletion at the first part when x is tiny(x = 1 , 2 , 3) b won't be an obsolete but when we reach a particular value the b will reach to obsoletion state because it makes not that much impact on the probing function for higher values of x not sure if that's right but that's my point of view
@bluejimmy168
@bluejimmy168 2 жыл бұрын
At 8:25, you said that 1 is a popular choice because GCD(N,1) is good no matter what the choice of N is. If that is the case, why would I ever choose 5 like your next example? If 1 works and is good for any size of N table size, is there any benefit of not choosing 1?
@jadalhamwi1543
@jadalhamwi1543 4 жыл бұрын
Phenomenal Explaination Thank you very much Keep it up !!
@MuhammadAhmad-qt6yq
@MuhammadAhmad-qt6yq 4 жыл бұрын
TOO GOOD EXPLANATION
@pedramhaqiqi7030
@pedramhaqiqi7030 2 жыл бұрын
is that a mistake where the keyhash is not mod N, in the other videos the key hash is H(k) mod N before u probe
@marcc1179
@marcc1179 4 жыл бұрын
Hi, the teacher said the linear probing can cause clustering. Could you please make video to explain this?
@alikhansmt
@alikhansmt 3 жыл бұрын
I think thats what he calls cycles that are less than size of the table. That is some slots/indices of hash tables may never get utilized if the linear probing parameters (a,b) are not chosen carefully.
@constantijndekker8343
@constantijndekker8343 3 жыл бұрын
I think your teacher was referring to something different. This is a phenomenon that occurs when your hash function is not good enough. Many consecutive elements in your table will form groups (cluster together) and if you insert into such a large group, it could take a lot of time. Clustering can be avoided by using quadratic probing, but linear probing has better cache performance.
@huyvole9724
@huyvole9724 6 жыл бұрын
Teacher, in the previous example you have a = 6 and N = 9 and you have alpha = a / N = 0.67 Why in the next example you have a = 5 and N = 12 and you have alpha = a / N = 0.35. Why not 5 / 12 = 0.4167 ???
@WilliamFiset-videos
@WilliamFiset-videos 6 жыл бұрын
The threshold is computed with multiplication, so T = α * N. Remember alpha is usually a constant so it does not change.
@huyvole9724
@huyvole9724 6 жыл бұрын
Thank you teacher. Where did alpha appear?
@WilliamFiset-videos
@WilliamFiset-videos 6 жыл бұрын
It's a constant you define between 0 and 1. It's just a percentage you define to determine when you should increase the size of the table.
@huyvole9724
@huyvole9724 6 жыл бұрын
So in the test at school, the question in the test will give me alpha, right?
@WilliamFiset-videos
@WilliamFiset-videos 6 жыл бұрын
Think of it as the threshold is the number of elements once reached you need to increase the hash table size and Alpha as the percentage of elements you need to reach to increase the table size
Hash table quadratic probing
9:27
WilliamFiset
Рет қаралды 24 М.
Hash Tables and Hash Functions
13:56
Computer Science Lessons
Рет қаралды 1,6 МЛН
Кто круче, как думаешь?
00:44
МЯТНАЯ ФАНТА
Рет қаралды 6 МЛН
ТЮРЕМЩИК В БОКСЕ! #shorts
00:58
HARD_MMA
Рет қаралды 2,7 МЛН
Turn Off the Vacum And Sit Back and Laugh 🤣
00:34
SKITSFUL
Рет қаралды 7 МЛН
Players vs Pitch 🤯
00:26
LE FOOT EN VIDÉO
Рет қаралды 138 МЛН
Hash table open addressing
11:09
WilliamFiset
Рет қаралды 28 М.
This Algorithm is 1,606,240% FASTER
13:31
ThePrimeagen
Рет қаралды 853 М.
Quadratic Probing Hash Table Example
7:20
randerson112358
Рет қаралды 73 М.
Hashing Technique - Simplified
17:04
Abdul Bari
Рет қаралды 775 М.
Hash table hash function
17:21
WilliamFiset
Рет қаралды 44 М.
Understanding and implementing a Hash Table (in C)
24:54
Jacob Sorber
Рет қаралды 365 М.
4. Hashing
52:55
MIT OpenCourseWare
Рет қаралды 340 М.
Hash table separate chaining
8:14
WilliamFiset
Рет қаралды 48 М.
Hash table double hashing
14:50
WilliamFiset
Рет қаралды 34 М.
Hashes 8 Open Addressing
10:46
RobEdwards
Рет қаралды 31 М.
Кто круче, как думаешь?
00:44
МЯТНАЯ ФАНТА
Рет қаралды 6 МЛН