Hashing - Double Hashing

  Рет қаралды 229,493

Lalitha Natraj

Lalitha Natraj

Күн бұрын

Пікірлер: 137
@pencilcat8034
@pencilcat8034 2 жыл бұрын
This channel is a godsend for all who are taking the course Data Structures and Algorithms (and similar) and suffer, like so many others, from lecturers who can't teach. Myself included. I would fail and drop out if videos like these didn't exist.
@POwens
@POwens 3 жыл бұрын
This saved me from failing out of my intro to data structures course (during COVID). Life saver.
@BhargavPuri-ki7hm
@BhargavPuri-ki7hm Жыл бұрын
Why madam takes 7 there
@Ahmet-dr1rq
@Ahmet-dr1rq 8 ай бұрын
@@BhargavPuri-ki7hm I think question gives us
@TheVk30
@TheVk30 3 жыл бұрын
literally the most underrated hashing legend thank you for saving me
@abhinavsingh595
@abhinavsingh595 4 жыл бұрын
Short and crisp explanation with example. Saved my lots of time. Thanks a lot
@ohhCrazzy
@ohhCrazzy 2 жыл бұрын
Thank the gods this video exist!
@رند-س5ح
@رند-س5ح Жыл бұрын
Thank you so much this saved me from today's discussion of data structures
@shanks9758
@shanks9758 3 жыл бұрын
Your voice is amazing ,it made fall to sleep . thank u ,u saved my life ,keep the good work
@abdullahabod6100
@abdullahabod6100 4 жыл бұрын
18mod7 =4 k= 4 , hash2 7-4=3 and so on for other numbers
@christianoliver5244
@christianoliver5244 3 жыл бұрын
Pro trick : watch movies at Flixzone. Been using them for watching a lot of movies during the lockdown.
@roycericky8991
@roycericky8991 3 жыл бұрын
@Christian Oliver definitely, I've been using flixzone} for years myself =)
@Mammajiprincess
@Mammajiprincess 2 ай бұрын
How to calculate mod..18%7 is 1.26 naa ❓
@Mammajiprincess
@Mammajiprincess 2 ай бұрын
Reply plz
@saharshamagar5059
@saharshamagar5059 Ай бұрын
@@Mammajiprincess 18/7 --> remainder = 4 so 18%7=4.
@subarux4054
@subarux4054 Жыл бұрын
I love the way you break down the concepts!! Thank you so much for sharing !
@faheemahmadofficial7701
@faheemahmadofficial7701 2 жыл бұрын
18's key hash 2 is 4 not 3???
@anshgoel6661
@anshgoel6661 2 ай бұрын
second hash function is k(mod)7 so putting the values in (7-k(mod)7) it comes out to be 3
@olympiasol8597
@olympiasol8597 3 жыл бұрын
Τhank you sooooooo much ... I was looking for this for 6 hours and it was a five min solution... hate my life -_- BUT YOU ARE GREAT:)
@KalathilAjayMenon
@KalathilAjayMenon 3 жыл бұрын
A simple example was taken. Hope you expand to a bigger example with multiple collisions.
@aswinbaiju5628
@aswinbaiju5628 4 жыл бұрын
And what happens if we get a larger value than our index limit?
@qb415
@qb415 6 ай бұрын
Normally you would do (hash1 + i + hash2) modulo array.length. This way the value can't exceed the index limit.
@FreddyJettyJohnson
@FreddyJettyJohnson 5 жыл бұрын
Thank you so much, you're doing a great job ❤️
@DuyNguyen-wx5oj
@DuyNguyen-wx5oj 4 жыл бұрын
great explanation and neat handwriting!
@heyyoga7515
@heyyoga7515 4 жыл бұрын
You are an excellent teacher! Did great on my quiz because of this video ❤️
@cannedshoes
@cannedshoes 3 жыл бұрын
You are a fantastic explainer. Much love from Texas :) and pray I pass this exam!
@rahulthapa7880
@rahulthapa7880 Жыл бұрын
Very nice Clearly understand Your voice is awesome ❤️❤️
@nqnqnq
@nqnqnq Жыл бұрын
there's an issue with this, you can get out of bounds. let's try to hash key 12, supposing index 12 is already occupied. hash1(12) = 12, hash2(12) = 2 you'd need to add key 12 at position 14, which doesn't exist. fix: position should be given by (hash1(key) + j * hash2(key)) mod size.
@kevinkingsly
@kevinkingsly Жыл бұрын
This is the correct method
@МартаДяків-т2л
@МартаДяків-т2л 3 жыл бұрын
Thank you so much for your videos! You are just the best!
@sovonmaji2929
@sovonmaji2929 3 жыл бұрын
Maam , when addition --- h1(k)+ j*h2(k) ,,,, greater than 13 , then what to do?
@DidierWyche
@DidierWyche Ай бұрын
Thanks for the forecast! I need some advice: My OKX wallet holds some USDT, and I have the seed phrase. (alarm fetch churn bridge exercise tape speak race clerk couch crater letter). How can I transfer them to Binance?
@valeriosilvestro7067
@valeriosilvestro7067 5 жыл бұрын
why 7?? is it an upper bound of 13/2?
@VivianGameCollections
@VivianGameCollections 2 жыл бұрын
WHAT A LIFESAVER, THANKS AND LOVE YOU SO MUCH, HOPE YOU HAVE A NICE DAY
@eeni14
@eeni14 4 жыл бұрын
Thank you so much! The explanation is really clear
@navyashalini2951
@navyashalini2951 2 жыл бұрын
y u have taking in hash2 (K)=7- kmod7??
@miguelnuno928
@miguelnuno928 3 жыл бұрын
Beautifully explained
@tahofu2618
@tahofu2618 4 жыл бұрын
what do you mean ... 5 + 0 in to 3, then 2 + 0 in to 1? I thought it was supposed to be hash1 + hash2 ??
@mahimanshah7851
@mahimanshah7851 4 жыл бұрын
Yessss
@mahimanshah7851
@mahimanshah7851 4 жыл бұрын
Even I dint get that part
@hakimmustafa3349
@hakimmustafa3349 3 жыл бұрын
in to = multiply = "j" state in the formula
@gautamgandotra9965
@gautamgandotra9965 Жыл бұрын
this is life saver. thank you
@hasan_shans
@hasan_shans 9 ай бұрын
Very nice courses! Thank you madam!
@mma4605
@mma4605 Жыл бұрын
Great job explaining!
@Guru-UPSC
@Guru-UPSC 5 жыл бұрын
Why u chose hash2 a particular function. Plz, elaborate the reason for choosing that function. Thanks
@randomname8750
@randomname8750 2 ай бұрын
she used an arbitrary function
@yousafraza7747
@yousafraza7747 4 жыл бұрын
Saved my day
@Albatross-vn7lq
@Albatross-vn7lq 11 ай бұрын
that was too simple..Thank u mam
@terryrodgers9560
@terryrodgers9560 2 жыл бұрын
amazing explanation, thank you
@gandreyhohlov1030
@gandreyhohlov1030 3 жыл бұрын
Thanks! But how do SEARCH (not insertion) works? For example, how to find 44, if 18(at index 5) was removed an is EMPTY?
@briannguyen1134
@briannguyen1134 4 жыл бұрын
for this example if 44 hash 1 was 5 and hash 2 was 6. Would we go in position 6? or would we do location of 5+(6*2)mod 13?
@divyaaskihal2194
@divyaaskihal2194 5 жыл бұрын
why did u take 7 while calculating v alue of h2?
@ashishthanga13
@ashishthanga13 5 жыл бұрын
r-k mod r is the formula and r should be a prime number less than the size of hash table
@abhinavsingh595
@abhinavsingh595 4 жыл бұрын
Its given in question and changes according to question.
@木林海风
@木林海风 2 жыл бұрын
Beautiful handwriting and cute voice ♥
@makeitmakesense-e3x
@makeitmakesense-e3x Ай бұрын
It would have been nice if you showed how you got the hash 2 values
@edoardogribaldo2870
@edoardogribaldo2870 Жыл бұрын
Great explanation, thank you very much!
@VersatileAnthem
@VersatileAnthem 4 жыл бұрын
mam why don't you upload new videos .your videos are far more better then university professors !
@oduyhung215
@oduyhung215 2 жыл бұрын
thank you very much for your videos. I have a question , what will we do if the collision occur at the final key when using linear probing and quadratic probing ?
@pvedits7977
@pvedits7977 2 жыл бұрын
Nice explaination
@sherrywu161
@sherrywu161 4 жыл бұрын
Really helpful!! very clear
@Anonymousgirl620
@Anonymousgirl620 Ай бұрын
Thank you sister helped a lot
@madhusudandas8411
@madhusudandas8411 2 ай бұрын
maam, are you doing MS in AI ?
@oliganguly2051
@oliganguly2051 5 жыл бұрын
thank u friend.. just for this video i can clear my concept
@1muharremyilmaz
@1muharremyilmaz 2 жыл бұрын
Thanks, From TURKEY
@theapex6097
@theapex6097 10 ай бұрын
what would happen if sum of two hashes is more than the table size?
@robertsterenchak8431
@robertsterenchak8431 3 жыл бұрын
Short and concise :) please make more videos like this 👍
@justtil6749
@justtil6749 3 жыл бұрын
Amazing explanation, thank you so much
@wallotube6359
@wallotube6359 4 жыл бұрын
Very nice.continue like this
@gayallaksara5256
@gayallaksara5256 5 жыл бұрын
Why didn't you modularized the double hashing function by the table size
@niazahmad7823
@niazahmad7823 5 жыл бұрын
Yeah she made that mistake she has to take modulus of the whole h1 plus h2
@jahehs
@jahehs 2 жыл бұрын
Where did you get the 7?
@hieutrongoan4656
@hieutrongoan4656 4 жыл бұрын
love your hand writing :D
@gauravojha1748
@gauravojha1748 Жыл бұрын
Ye hash 1 nd hash 2 kha se aaya
@jakobjensen8228
@jakobjensen8228 2 жыл бұрын
Anyone here know what m in this statement could be? H2(k) = 1 + (k mod (m - 1) I get that it's the hash2 taking the key as input, but what would m represent here? A value incrementing if the spot it taken perhaps?
@J2KJonas
@J2KJonas 2 жыл бұрын
The m represents the size of the array so if you have got an array of [1, 2, 3, 4, 5, 6] then the m is 6. AAU gang here to save you (skal selv op i ALG)
@jakobjensen8228
@jakobjensen8228 2 жыл бұрын
@@J2KJonas King, gir en øl i gaden.
@nandinigorla
@nandinigorla 4 жыл бұрын
How can u take that mod 13. If they given we taken.... right...and for hash 2 also how can u randomly take 7 and for the mod also take 7
@fisayoojo9331
@fisayoojo9331 3 жыл бұрын
I don't know how you manufactured the 7 in the first four lines and you didn't explain that. Had to use other resources to figure that out.
@AdvayBasavaraju
@AdvayBasavaraju 2 жыл бұрын
Wowee great vid, helped a lot thx so muhc tee hee
@Iam_Smk
@Iam_Smk 3 жыл бұрын
Short and sweet
@dipanshunautiyal4234
@dipanshunautiyal4234 5 жыл бұрын
Vo 11-kmode11 ku nhi hua?
@rolandor9678
@rolandor9678 3 жыл бұрын
wow, me encanta que excelente explicación, muchas gracias.
@tafveezahmad9692
@tafveezahmad9692 3 жыл бұрын
ERROR IS THERE (hash1(k) +j*hash2(k))modN will be there you have missed modN
@bedtimestoriesforkids9755
@bedtimestoriesforkids9755 4 жыл бұрын
Are you from CMU?
@vamsikrishnach9278
@vamsikrishnach9278 5 жыл бұрын
Excellent job madam 🤩🤩🤩🤩🤩
@BhargavPuri-ki7hm
@BhargavPuri-ki7hm Жыл бұрын
Why madam takes 7 there
@rakshithgrajcse330
@rakshithgrajcse330 2 жыл бұрын
very much helpful thank you
@zenekquerky7255
@zenekquerky7255 2 жыл бұрын
It can happen that hash1(k) + j * hash2(k) > 13 I think its possible, despite that 7 and 13 are prime. In your example you had "Lucky numbers" :D Otherwise you end up with index out of bounds.
@chainsawman-stoic
@chainsawman-stoic 2 жыл бұрын
doesn't matter if index is out of bounds
@RustyBagel127
@RustyBagel127 2 жыл бұрын
@@chainsawman-stoic so if it becomes out of bounds then what happens?
@nqnqnq
@nqnqnq Жыл бұрын
@@chainsawman-stoic it does
@Dwika34
@Dwika34 3 жыл бұрын
I think the first thing you should say is that double hashing only works for a prime length array. The second thing you should fix is: I think the formula should not d be hash(k) + jhash2(k), the reason being that I tried it using a while loop in java and it enters an infinite loop . By your approach if the j is zero then the code would keep on repeating itself(do keep in mind that the second function cannot have the value of 0 in double hashing). So it should always start with hash(k) + hash2(k). So it should look like this hash(k)=hash(k)+hash2(k). This way we would always reach the intended way purpose of double hashing which is to increment hash(k) with the value of hash2(k). Like many beginners, I think those 2 points would make it easier for us to grasp and comprehend the material. Thank you, otherwise great content and delivery
@richardpaul5427
@richardpaul5427 2 жыл бұрын
I think that starting with j = 0 is fine, there doesn't seem to be any reason why you'd need to start with j = 1. Also, double hashing can work on non-prime length tables, if the hash2(k) always outputs a number that is not a factor of the size of the table.
@mohammedafzal5720
@mohammedafzal5720 5 жыл бұрын
How did you calculate H1 and H2?
@AshutoshSingh-qj1gm
@AshutoshSingh-qj1gm 5 жыл бұрын
taking mod values, like we do for other hashing functions
@fisayoojo9331
@fisayoojo9331 3 жыл бұрын
@@AshutoshSingh-qj1gm not exactly there's sth about prime numbers for H2.
@elkleelekee
@elkleelekee 2 жыл бұрын
@@fisayoojo9331 it has to be of q - (k mod q) where q is smaller or equal the size of the array
@berndlauber6328
@berndlauber6328 4 жыл бұрын
perfect teacher :o))
@bellenature143
@bellenature143 3 жыл бұрын
How to get hash1 and hash2 values
@jayprakashjaiswaldeptofcom1250
@jayprakashjaiswaldeptofcom1250 Жыл бұрын
really ,u dont think its important to tell hwo to take second hash function ?
@ilhemwalker9145
@ilhemwalker9145 4 жыл бұрын
Thank you sooo much ❤
@ΠαναγιώτηςΧατζηδαυιτίδης
@ΠαναγιώτηςΧατζηδαυιτίδης 3 жыл бұрын
thank you kind woman
@zum4342
@zum4342 3 жыл бұрын
THank you very much
@bouboudubinks6959
@bouboudubinks6959 7 ай бұрын
amazing
@mohammadgh5768
@mohammadgh5768 Жыл бұрын
Thanks tomorrow I'll have a ds exam
@nguyenquanghuy963
@nguyenquanghuy963 4 жыл бұрын
thanks you so much
@ort.school
@ort.school 7 ай бұрын
cool, thanks
@mdkanokhossain1445
@mdkanokhossain1445 4 жыл бұрын
Thank You
@kumarnigam8078
@kumarnigam8078 5 жыл бұрын
dought free lecture :)
@nhat1286
@nhat1286 2 ай бұрын
nice!!!!
@kantipudiavinash5743
@kantipudiavinash5743 Ай бұрын
Nice voice❤
@faheemahmadofficial7701
@faheemahmadofficial7701 Жыл бұрын
11 mod 7 is 4
@fkhan2416
@fkhan2416 5 ай бұрын
The hash 2 value of key 44 is 1 not 5.
@SirSimon-zg2rm
@SirSimon-zg2rm 5 жыл бұрын
Thanks!!!!
@karthikeyan4375
@karthikeyan4375 5 жыл бұрын
I want extendable hashing
@przemysawcwiek8306
@przemysawcwiek8306 3 жыл бұрын
HELLO im from poland, im young programmer, im have algoritmos kolokwium, thx for help.
@anandhakannan2435
@anandhakannan2435 4 жыл бұрын
I lub u😻
@er_surya__7__118
@er_surya__7__118 2 жыл бұрын
😇😇😇😇
@nomindulal3102
@nomindulal3102 Жыл бұрын
h2(K) i didn't understand
@nirmishrathod9813
@nirmishrathod9813 4 жыл бұрын
Explain me the calculation of " hash2 "
@sinto4105
@sinto4105 5 жыл бұрын
you have taken easy example
@sinto4105
@sinto4105 5 жыл бұрын
take some complex example
3 жыл бұрын
saolasın hintli bacı
@gangstergangster5454
@gangstergangster5454 Жыл бұрын
eyy ooru madam meddhi mee number pettandi please
@sameerthakur851
@sameerthakur851 Ай бұрын
mam wiTh face cam pdao
@aakashsuresh2566
@aakashsuresh2566 Жыл бұрын
Math in Ohio 5+1*5=10 lmfoa 3:40
@JacksonFilmsMovies
@JacksonFilmsMovies Жыл бұрын
It is 10 bro
@Fullpoor69
@Fullpoor69 4 ай бұрын
Aint no way
Hashing - Rehashing
7:23
Lalitha Natraj
Рет қаралды 94 М.
Hashing - Quadratic Probing
11:03
Lalitha Natraj
Рет қаралды 96 М.
黑天使只对C罗有感觉#short #angel #clown
00:39
Super Beauty team
Рет қаралды 36 МЛН
Мясо вегана? 🧐 @Whatthefshow
01:01
История одного вокалиста
Рет қаралды 7 МЛН
VIP ACCESS
00:47
Natan por Aí
Рет қаралды 30 МЛН
10.1 AVL Tree - Insertion and Rotations
43:08
Abdul Bari
Рет қаралды 1,3 МЛН
8.3 Double Hashing | Collision Resolution Technique | Data Structures and algorithms
26:52
Hash Tables and Hash Functions
13:56
Computer Science Lessons
Рет қаралды 1,6 МЛН
The Dome Paradox: A Loophole in Newton's Laws
22:59
Up and Atom
Рет қаралды 746 М.
L-6.7: Double Hashing | Collision Resolution Technique
10:28
Gate Smashers
Рет қаралды 452 М.
Hashing Technique - Simplified
17:04
Abdul Bari
Рет қаралды 787 М.
Quadratic Probing Hash Table Example
7:20
randerson112358
Рет қаралды 73 М.
Hashing  - Linear Probing
15:34
Lalitha Natraj
Рет қаралды 79 М.
Hashing - Hash Codes
18:10
Lalitha Natraj
Рет қаралды 18 М.
黑天使只对C罗有感觉#short #angel #clown
00:39
Super Beauty team
Рет қаралды 36 МЛН