Understanding Java String Hashcode - explained with use cases and examples

preview_player
Показать описание
In this video, i will explain about Java String HashCode function.
Рекомендации по теме
Комментарии
Автор

This is one of the best videos explaining hashing on yt, thank you!

jpfdjsldfji
Автор

The nearest prime number to 26 is 23 - or go with the upper bound, and you get 29. I can't understand why 31 is the number

omidtarabavar
Автор

Why we use the nearest prime to 26 .. 31 to multplied to ASCII code of the character Sir ?? And thank's for the video

abdoux
Автор

Thanks a lot, I got clear understanding

karandedhiya
Автор

Why is S(2)*31^1 in the exponent 1? and not 2? I am confused. So N is total, which is 4, why is it not 3 then..thanks for the amazing

anna-chiarawursten
Автор

@4:38 its a mistake that we would get the same value if we rearanged the letters :D
Great video anyways, You explained it very well ;).Keep it up

andrejcapin
Автор

why we use implementation in public native int hashcode in java

kumarkumartalk
Автор

why you don`t show some code, so we can see

paganimarker
Автор

The whole explanation of why 31 is used is wrong. Researchers found that using 31 gives a better distribution to the keys, and fewer collissions.

faceTheCandidates