Hashing | Set 2 (Separate Chaining) | GeeksforGeeks

Explanation for the article: quiz.geeksforgeeks.org/hashing...
This video is contributed by Illuminati.

Пікірлер: 81

  • @m-falcon
    @m-falcon3 жыл бұрын

    Thanks to geeks for geeks . Everyday when I commute , I watch data structure or algorithm lecture . It's short but clear

  • @Kazner0h
    @Kazner0h Жыл бұрын

    You are an incredible teacher. you made that very simple.

  • @prag7749
    @prag77496 жыл бұрын

    very easily explained. thank u so much.. and your voice is too sweet :)

  • @truekili9215
    @truekili9215 Жыл бұрын

    Thank you so much this is extremely clear and concise!

  • @sachinwalunjakar8854
    @sachinwalunjakar88543 жыл бұрын

    Clearly understand concept, thank you !!! for this video.

  • @lucascyrneferreira3306
    @lucascyrneferreira33064 жыл бұрын

    Very good tutorials, teacher! But please, increase the mic volume. Sometimes it's very hard to listen it clearly. Thanks for the awesome content!

  • @konnorzayn5097

    @konnorzayn5097

    3 жыл бұрын

    I realize it is kinda off topic but do anybody know of a good site to stream newly released tv shows online?

  • @orionhenrik3439

    @orionhenrik3439

    3 жыл бұрын

    @Konnor Zayn I watch on Flixzone. Just google for it =)

  • @graysonbeckett2305

    @graysonbeckett2305

    3 жыл бұрын

    @Orion Henrik Yea, I have been using Flixzone for since march myself :)

  • @konnorzayn5097

    @konnorzayn5097

    3 жыл бұрын

    @Orion Henrik thank you, I went there and it seems like a nice service :) Appreciate it!

  • @orionhenrik3439

    @orionhenrik3439

    3 жыл бұрын

    @Konnor Zayn No problem xD

  • @zeusjanseng.lujares7428
    @zeusjanseng.lujares74285 жыл бұрын

    THANKS THIS HELPED VERY MUCH!!!

  • @amritanjali7929
    @amritanjali79296 жыл бұрын

    thank you for this video your voice is too sweet .

  • @lakhdeepsingh5883
    @lakhdeepsingh58834 жыл бұрын

    This guy is best teacher at GFG

  • @yagatipavani3305
    @yagatipavani33056 жыл бұрын

    suppose i stored 3 phone numbers in hash table with hash value 1 using chaining then how can i retrieve data related to 2nd phone number?!!

  • @raghu_teja4683
    @raghu_teja46836 жыл бұрын

    as we will have keyvalue pairs,where should we have to store values? thankyou

  • @vikashkumarchaurasia1299
    @vikashkumarchaurasia12996 жыл бұрын

    very-very nice explanations

  • @chahrazadseh1958
    @chahrazadseh1958 Жыл бұрын

    thank you so much for the explanation. but in 6:37 what does link addresse stands for ?

  • @komalkasyap7104
    @komalkasyap71046 жыл бұрын

    sir, can you explain what is cache performance ..thanks.

  • @mravenec64
    @mravenec645 жыл бұрын

    The important part is missing and that is how do you retrieve values from the collision array. When hash function is used, you will recieve array. You need to store key value pairs. Then you have to go through whole array and compare wanted key with keys in stored key-value pairs (classic sequencial search with O(n) complexity). That is reason, why worst complexity is O(1+k), where k is number of elements in collison array for specific key and 1 stand for constant complexity of hashing function.

  • @RM-lb7xw

    @RM-lb7xw

    3 жыл бұрын

    Why would you need to sequentially search for the key? The wanted key would be hashed by the hash function again and we'd get the index from it. Since the index is generated, accessing that index would cost O(1).

  • @CarlosArnauRos

    @CarlosArnauRos

    2 жыл бұрын

    @@RM-lb7xw Each cell points to a linked list of hashed terms, so if you had 10 collisions you would have to iterate a linked list with said terms, where the complexity would be O(n)

  • @nqnqnq

    @nqnqnq

    Жыл бұрын

    ​@@CarlosArnauRos regarding O(1+alpha), i believe the maker of the video referred to the average case, not the worst case. indeed, the worst case is O(z), where z is the size of the biggest linked list found in the table. edit: matter of fact, worst case is Θ(z)

  • @sunainaghosh851
    @sunainaghosh8515 жыл бұрын

    hi, thank you so much for the detailed explanation. I had one question, who decides which collision technique is to be used?

  • @abhijeetkumar2204

    @abhijeetkumar2204

    5 жыл бұрын

    We use best Technic

  • @Bakasta170
    @Bakasta1703 жыл бұрын

    great explanation, thankyou :)!!

  • @akhiljobby6829
    @akhiljobby68296 жыл бұрын

    @GeeksforGeeks I was wondering what will be the maximum number of collisions caused by the above insertions. Would it be 3 (total number of collisions) or 2 (maximum collisions at any key). Thank you.

  • @siddharthmagadum16

    @siddharthmagadum16

    4 жыл бұрын

    3

  • @mahendraseth09
    @mahendraseth096 жыл бұрын

    number of keys stored in table is n=7 but what is m here exactly? number of slots as in, number of occupied slots(4+3) or the total number of slots(which is 7+3=10 here) or do we really consider the extended nodes as slots?

  • @aoshinomori

    @aoshinomori

    6 жыл бұрын

    Mahendra Seth n = number of keys m= number of slots

  • @neelkamal811101

    @neelkamal811101

    5 жыл бұрын

    same doubt for me .......someone pls clear this doubt...

  • @rrupeshh
    @rrupeshh4 жыл бұрын

    Since its a key-value pair. Suppose if we have three phone numbers belongs to the same hash and stored values in a linked list. How to know which data belong to which key since the index is the same?

  • @enterb7643

    @enterb7643

    4 ай бұрын

    You perform a linked list search. That's why the expected time complexity for search is O(1 + a), where a is the average number of stored values assigned to one hash. In the worst case, all the values in a hash table will be assigned to one hash, so the search will take O(n) time.

  • @sanjanaattanayake4231
    @sanjanaattanayake423110 ай бұрын

    Thank you Geeks for Geeks :)

  • @tanaykulkarni2116
    @tanaykulkarni21163 жыл бұрын

    is it necessary to use linked list or we can use vector

  • @abhishekmangaraj
    @abhishekmangaraj6 жыл бұрын

    4:37 we therefore put "73" not 3

  • @rayneberbia4310
    @rayneberbia43106 жыл бұрын

    WOW, YOU ARE GREAT :)

  • @Drilondfc123
    @Drilondfc1237 жыл бұрын

    Thank you very much your video helped me a lot

  • @GeeksforGeeksVideos

    @GeeksforGeeksVideos

    7 жыл бұрын

    Thanks Drilondfc. We're glad that we could be of any help.

  • @saihemanthiitkgp
    @saihemanthiitkgp7 жыл бұрын

    Insertion will take only O(1) worst case time when we always insert at beginning of list

  • @adishct4371
    @adishct4371 Жыл бұрын

    How we can create hash table? please include that also because majority peoples have no idea about hash tables, and its creation. Thank you for your tutorials.

  • @user-dm1jh7ce8g
    @user-dm1jh7ce8g Жыл бұрын

    Thank you so much 🙏🙏

  • @gauravnagamaheswarpattem7069
    @gauravnagamaheswarpattem70694 жыл бұрын

    What will be there in the remaining empty spaces if no elements are filled??? How should we initialise it first?

  • @DrSupes

    @DrSupes

    4 жыл бұрын

    GAURAV NAGA MAHESWAR PATTEM they are set as NULL

  • @javieragutierrez5055
    @javieragutierrez50554 жыл бұрын

    Gracias, realmente entendi bastante

  • @gauravpathak6400
    @gauravpathak64004 жыл бұрын

    what is expected number of probes in unsuccessful search??????

  • @ButerWarrior44
    @ButerWarrior442 жыл бұрын

    5:02 So I understand the hash table diagram showing the keys, but where are the values?

  • @abdulahadshaikh8495
    @abdulahadshaikh84956 жыл бұрын

    great tutorial sir

  • @GeeksforGeeksVideos

    @GeeksforGeeksVideos

    6 жыл бұрын

    Thanks :)

  • @xReema
    @xReema5 жыл бұрын

    Thanq very much 🙏🏻🙏🏻🙏🏻🙏🏻✨

  • @krishnavamsinadharikatla5150
    @krishnavamsinadharikatla51504 жыл бұрын

    What is Cache performance?any one answer plz

  • @BRBallin1
    @BRBallin14 жыл бұрын

    I understand this concept but how does it know how to get the right value from the linked list?

  • @muhammedbayram4624

    @muhammedbayram4624

    3 жыл бұрын

    It does linear searching in linked list.

  • @christianrosado8838
    @christianrosado88383 жыл бұрын

    Im confused. I thought we would use the Key to calculate the hash code, find an index and insert a value not insert the key itself???

  • @shabanakhanpathan8664
    @shabanakhanpathan86644 жыл бұрын

    Hash functios is a pre defined function

  • @satadhi
    @satadhi7 жыл бұрын

    bro this is awesome !!!!! hi can u tell at 5:43 what the third point is trying to convey ?

  • @kendrickjg

    @kendrickjg

    6 жыл бұрын

    He is basically saying that the hash function used to determine the key doesn't matter because you always have a way to add an element to that slot.

  • @Code_Solver
    @Code_Solver3 жыл бұрын

    Well explained

  • @sayantaniguha8519
    @sayantaniguha85193 жыл бұрын

    1:06 How can index for array/linked list be a String ? 🙄🙄

  • @jayajaya4862
    @jayajaya48625 жыл бұрын

    Explanation is simpler and easier.

  • @yashwiparashar8598
    @yashwiparashar85984 жыл бұрын

    How is the time complexity O(1+a) ??

  • @panoskatsos5454

    @panoskatsos5454

    4 жыл бұрын

    the hashing algorithm has complexity O(1) when searching and inserting elements cause we only do one calculation to determine the hash . The separate chaining has this complexity + the average slots the algorithm has to pass to insert or find an element. But with that said constants are ignored in big O notation, therefore, the complexity is again O(1) even if it is not addressed in the video

  • @nandkishorenangre8244
    @nandkishorenangre82446 жыл бұрын

    how can be the time complexity O(1)?? coz we need some time in order to search for the key in the hash table... lets say that we have hash table of size T so its time complexity should be O(T)....?? right

  • @2fast4uspartan

    @2fast4uspartan

    6 жыл бұрын

    Hash table lookups/searches are O(1) b.c. your key serves as an input to a hash func which will output an index at which your value will be placed. Hash func takes O(1) time.

  • @kendrickjg

    @kendrickjg

    6 жыл бұрын

    It's O(1) because you find your element in the table like this: element = hashtable[key]. It's constant time to search for the FIRST element in the chain.

  • @debayanichakraborty7219
    @debayanichakraborty72194 жыл бұрын

    Hey, please explain again how you find the complexity

  • @akarshagnihotri4352
    @akarshagnihotri43525 жыл бұрын

    Voice of video is not clear, so please fix it.

  • @aiseknewton
    @aiseknewton5 жыл бұрын

    so.. no comment about the caption?

  • @prashantsingh456
    @prashantsingh4562 жыл бұрын

    why u always taking mod 7

  • @avicado.0
    @avicado.02 жыл бұрын

    bade sweet sound karte ho bhai aap😂🙏

  • @mahioocode
    @mahioocode4 жыл бұрын

    WHY X IS BEING MOD BY 7? I CAN MOD BY ANY INT??

  • @apanuragp7

    @apanuragp7

    4 жыл бұрын

    Yes you can use any integer but Prime numbers are preferred mostly as they reduce the number of collisions thereby reducing the size of LinkedList and to be more efficient you should choose a prime number that is not closer to the numbers which are powers of 2

  • @nikitakushwaha9572
    @nikitakushwaha95724 жыл бұрын

    Sir slow understanding.no clear voice.

  • @abivilion8559
    @abivilion85593 жыл бұрын

    abe tej bole????

  • @Marwan-oh4tk
    @Marwan-oh4tk7 ай бұрын

    Contributed by Illuminati? Lol

  • @Edouardos100
    @Edouardos1005 жыл бұрын

    Can u talk normally?

  • @kamilkostya8600
    @kamilkostya86002 жыл бұрын

    why are you taking such breaks between words, it makes listener feel dumb

  • @Prince-hx2pt

    @Prince-hx2pt

    7 ай бұрын

    🤣🤣🤣

  • @harish5847
    @harish58474 жыл бұрын

    Please have someone else do the videos. This way of explaining, the rythm in which he is talking is really irritating and too slow.