#10 - How HashMap works internally || Popular java interview question on collection (HashMap)

Sdílet
Vložit
  • čas přidán 22. 10. 2020
  • In this video, I have explained How HashMap works internally, what is hashing and HashCode, what is indexing and how is it calculated from Hashcode?
    This is a very popular java interview question on collection (HashMap).
    References taken from:
    Java 8 API Doc
    Oracle Java 8 Source Code
    Geeks of geeks
    Full Java Collection Playlist:
    • Latest Java Collection...
    ~~~Subscribe to this channel, and press bell icon to get some interesting videos on Selenium and Automation:
    czcams.com/users/Naveen%20Au...
    Follow me on my Facebook Page:
    / naveenqtpexpert
    Let's join our Automation community for some amazing knowledge sharing and group discussion on Telegram:
    t.me/joinchat/COJqZUPB02r5sB7...
    Paid courses (Recorded) videos:
    naveenautomationlabs.com/reco...
    For Java & Selenium - naveenautomationlabs.com/selen...
    For API (Manual + Automation) - naveenautomationlabs.com/manua...
  • Věda a technologie

Komentáře • 232

  • @soumyajit443
    @soumyajit443 Před 2 lety +35

    I have read about this from multiple resources.But I had never seen it in real 'how exactly it works'.You have explained so beautifully.Its just amazing. I would say you are "THE DRONACHARYA" (who was was royal preceptor to the Kauravas and Pandavas.)
    Thank you so much for making this awesome video.Its so clear and precise.Thanks

    • @naveenautomationlabs
      @naveenautomationlabs  Před 2 lety +3

      Most welcome:) keep learning 👍😃

    • @soumyajit443
      @soumyajit443 Před 2 lety

      @@naveenautomationlabs I want to get strong in logic building.I appeared for an interview but did not get selected in first round.They asked to write a program which would take input an Integer array having only zeros and ones and output will be sorted Integer like 000011111.I could not answer it.
      Actually Naveen,I need a proper plan and guidance to get strong in my programming skills.Please guide me if you provide any personal training I would like to enroll for it as its high time and I want a change in my career.

    • @rachakatladheer9059
      @rachakatladheer9059 Před 2 lety +2

      @@soumyajit443 use Sort Class
      int arr[] = {0,1,0,1,0,1,0,1,1,0,0,1};
      Arrays.sort(arr);
      System.out.println(Arrays.toString(arr));
      o/p - [0,0,0,0,0,0,1,1,1,1,1,1]

    • @anushavenkatesan685
      @anushavenkatesan685 Před 2 lety +2

      @@soumyajit443 check his website. He s taking live classes

  • @sureshgarine
    @sureshgarine Před 3 lety +24

    I appreciate your research on Hashmap implementation under the hood, I remembered my college day's Hashing concept implementation, now I see in reality in debug mode. Thanks, Naveen. this is called bridging the gap between institution and industry. :)

  • @abhiPn9160
    @abhiPn9160 Před 9 měsíci +2

    Thanks sir....i searched many time for working of hashmap. But Didn't satisfied with explanation all they have. But after ur video now I am cleared about hashmap. Your explanation in simple and better 🙏 thnks sir

  • @rd3316
    @rd3316 Před 2 lety +2

    🙌take a bow Naveen . I searched this on internet and no one has explained it in such an easy way like you .

  • @Ranjan-Singh89
    @Ranjan-Singh89 Před 3 lety +5

    Thanks, Naveen for creating this whole java collection video series. In this series, you have really explained each and every collection framework topic in an awesome way and In fact, I am following a couple of automation tutors on CZcams but no one has explained these topics in such an easy and understanding way. 😊👍👍

  • @gita3354
    @gita3354 Před 3 lety +4

    Excellent explanation Naveen . I was so scared to learn the collections concept in java. But you have made it like a cupcake . Thanks much for your time and effort. I don't think even the paid courses will give this much explanation for each nuke and corners.

  • @viveksinghbais4133
    @viveksinghbais4133 Před rokem +2

    Thank you, sir, I can't even imagine how much hard work and research are required to create such knowledgeable content. thanks so much

  • @kumargaurav4362
    @kumargaurav4362 Před 2 lety +4

    In Java 8, HashMap replaces linked list with a binary tree when the number of elements in a bucket reaches certain threshold. While converting the list to binary tree, hashcode is used as a branching variable. If there are two different hashcodes in the same bucket, one is considered bigger and goes to the right of the tree and other one to the left. But when both the hashcodes are equal, HashMap assumes that the keys are comparable, and compares the key to determine the direction so that some order can be maintained. It is a good practice to make the keys of HashMap comparable.
    This JDK 8 change applies only to HashMap, LinkedHashMap and ConcurrentHashMap.

  • @swapnakadam1822
    @swapnakadam1822 Před 2 lety

    The best explanation on How hashmap works internally, I have seen so many videos but I get confused instead of understanding but this is PERFECT....Thank you...

  • @prabhakarreddy9180
    @prabhakarreddy9180 Před 3 lety +1

    Entire CZcams ur explanation is just awesome

  • @sharvilpatil8742
    @sharvilpatil8742 Před rokem +1

    This is the best explanation one can ever get on Hashing and Hashmap. Great explanation Naveen!

  • @Fortheluvoffood
    @Fortheluvoffood Před 3 lety +1

    really good explanation... learning from your channel is very much easier than reading stuff on internet and reading books... precise explanation with good examples clears the concept easily rather than getting confused in it... appreciate your efforts and your easiness towards teaching these concepts... you do it so confidently and so easily... thankyou so much...

  • @mahiradolan4160
    @mahiradolan4160 Před 3 lety +3

    Very detailed and excellent explanation. Thank you, Naveen!

  • @suyogdtalathi924
    @suyogdtalathi924 Před 2 lety +1

    Thanks !! After searching more for hashmap internal structure this one is the best explanation

  • @gurunadhmitikela2918
    @gurunadhmitikela2918 Před 2 lety +3

    Wow.. what a wonderful explanation Naveen. Kudos to you for teaching this complex concept in such a simplified way. Really appreciate the hard work you would have put in to break this one brick by brick. :)

  • @sachida23
    @sachida23 Před 3 lety +1

    Explanation is precise and crisp and well documented thanks for this post.

  • @muzammilkhan382
    @muzammilkhan382 Před rokem +1

    Thankyou Naveen Sir for your explanation! After banging my head for hours, and reading articles, finally found your video and understood how it works.

  • @rakeshdora6
    @rakeshdora6 Před 3 lety +1

    Really appreciate your work and awesome explanation i saw several videos for hashmap implementation and work flow. But this is the BEST.

  • @aryacode1705
    @aryacode1705 Před 2 lety +1

    Thank you so much, sir, I can't even imagine how much hard work and research are required to create such knowledgeable content. thanks so much

  • @Lipunknb
    @Lipunknb Před rokem +1

    the best hashmap internal working video on youtube. OP🙌

  • @sujith6323
    @sujith6323 Před 3 lety +3

    Explanation followed by the important notes was very helpful. Really appreciate this Quality content.

  • @ambicaponnaluri7743
    @ambicaponnaluri7743 Před rokem +1

    All my queries regarding Harshmap were cleared after watching this.Awesome work😊
    Keep rocking..
    Thankyou much Naveen

  • @sandeepchoudhary3882
    @sandeepchoudhary3882 Před 3 lety +2

    Awesome...very detailed explanation. Thank you Naveen !

  • @lockdowndiaries4090
    @lockdowndiaries4090 Před 2 lety +1

    super. simple and clear explanation. i have searched many videos. nothing compared to urs. great and thank you so much for helping us out

  • @usmanahmad5448
    @usmanahmad5448 Před rokem +1

    This is by far the best explanation.

  • @charismatic2
    @charismatic2 Před 3 lety +1

    Thank you so much Naveen for detailed and clear explanation.

  • @sakshiaggarwal6199
    @sakshiaggarwal6199 Před 3 lety +2

    Thanks a lot Naveen. This was much needed to understand the internal working. 😇 Especially the debugging how it is calculating the hashcode is ultimate.

  • @jatinsharma3792
    @jatinsharma3792 Před 2 lety +1

    You always saves me in difficult situation where understanding is not easy. :D Thanks!!

  • @b3creativevlogs815
    @b3creativevlogs815 Před 3 lety +1

    Superb Explanation Naveen now I understood the HashMap how its working...Thank you so much...

  • @gopalpandurangan9768
    @gopalpandurangan9768 Před 3 lety +1

    Excellent demonstration on HashMap. Thanks

  • @poonamsharma7026
    @poonamsharma7026 Před 3 lety +1

    Thanks a lot Naveen.
    You are right, it really gets difficult to understand from documentation, we need practical implementation, and as always you made it easy :).

  • @sreedevimoningi9739
    @sreedevimoningi9739 Před 3 lety +2

    Thank you so much Naveen for this video, very detailed and excellent explanation you have given. I did really felt amazing.

  • @gauravjaykar8126
    @gauravjaykar8126 Před 3 lety +1

    Appreciate your Work ,You Covered every Possible concept

  • @dhareppasasalatti7102
    @dhareppasasalatti7102 Před 2 lety +1

    The best out of the best Explanation I have even seen on this hashmap.. Thank you sir for the effort.. It's was 💯💯

  • @hasmukhmaniya4214
    @hasmukhmaniya4214 Před 3 lety +1

    Thanks for the video Naveen and one of the best video to understand HashMap functions.

  • @utpalkanti
    @utpalkanti Před 2 lety +1

    Excellent explanation. Many many thanks for this kind of video. Recollecting my old college day topics now...

  • @vinodkumar-ss3mb
    @vinodkumar-ss3mb Před 3 lety +1

    What a wonderful explanation sir
    You made this topic so easy
    God bless you 🙏

  • @ashuiet
    @ashuiet Před 3 lety +2

    Earlier I have tried to understand the "Hashing Concept" from several sources but it seems very confusing but the way you have expalain now this concepts has cleared now. So, Here after I can explain the hashing concept to anyone.
    Thanks !! Naveen

  • @sumitbabel5415
    @sumitbabel5415 Před 3 lety +1

    Exceptionally well explained , I would really like to express my gratitude for such a marvelous and clear explanation. To be honest I am able to understand and register it very nicely. Many thanks and God bless dear.

  • @syedjami4033
    @syedjami4033 Před 2 lety +1

    Amazing. Just loved the explanation.

  • @nithyar767
    @nithyar767 Před rokem +1

    You have done a wonderful job Naveen ! Thanks!

  • @vandanamishra6748
    @vandanamishra6748 Před 2 lety +1

    Your each video is so well explained .. after going through your videos my base is getting cleared on many topics .. keep making good videos.. god bless you for ur hard work ..🙏🙏

  • @Sogdo
    @Sogdo Před 2 lety +1

    Thanks for the video Naveen, very few content creators covers this topic.

  • @ruch3719
    @ruch3719 Před rokem +1

    Very well and crisp with what is required and the clarity of topic stays longer in mind ..with so neat and clear explanation.Hope you keep posting more content on data structures and common topic which are required longer

  • @himanshikushwah8341
    @himanshikushwah8341 Před 3 lety +1

    Best explaination i got so far👍

  • @sandeshkumar9156
    @sandeshkumar9156 Před 3 lety +1

    CZcams really has some great teachers. If I get teachers like Naveen I would love to study all day.

  • @vemurisirisha8543
    @vemurisirisha8543 Před 2 lety +1

    Superb explanation sir. Thank you so much for all ur efforts!

  • @Coolharshit149
    @Coolharshit149 Před 2 lety +1

    What an amazing explanation. Thanks :)

  • @Anuragidiot1
    @Anuragidiot1 Před 3 lety +1

    Great Video finally it helped me understand how it works Thank You Naveen

  • @priyanshusinha7056
    @priyanshusinha7056 Před 2 lety +1

    Good Explanation ❤❤ Thank you NAVEEN Sir

  • @shilpashravge5393
    @shilpashravge5393 Před rokem +1

    Excellent session as usual. Things look so easy after your explanation.
    Thanks for the efforts and time 😇

  • @shobhit9826
    @shobhit9826 Před 3 lety +5

    Yes this is the most important interview question I have also faced the same multiple times

  • @msanyasirao5411
    @msanyasirao5411 Před 2 lety +1

    Thank you.. Explained in an understanding of this typical hash code topic..Really Good

  • @funved3371
    @funved3371 Před rokem

    You have explained this complex topic in a way which is very easy to understand.
    Thank you very much sir.

  • @badrinathdanave
    @badrinathdanave Před 3 lety +2

    Thanks a lot naveen for this great content.

  • @sathishrajasekar1155
    @sathishrajasekar1155 Před 2 lety +1

    Thanks Naveen, Useful video.

  • @parameshwarpr1364
    @parameshwarpr1364 Před 3 lety +1

    Well explained sir, thank you so much.

  • @shankumondal2881
    @shankumondal2881 Před 3 lety +1

    Awesome !! It's a very detailed explanation and very interesting . 👍

  • @magicallife9299
    @magicallife9299 Před 2 lety +1

    Best explanation of hash map

  • @dhandapani.sudhakar
    @dhandapani.sudhakar Před 2 lety

    Thanks, Naveen for the clear explanation.

  • @varshahiremath1189
    @varshahiremath1189 Před 3 lety +1

    Nicely Explained Naveen

  • @anjalijha1598
    @anjalijha1598 Před 2 lety +1

    As always best and this specific is really awesome Video on Hashmap internal working .

  • @raghugunda2732
    @raghugunda2732 Před 2 lety +1

    Very good explanation. Thank you so much

  • @shrutijoshi6496
    @shrutijoshi6496 Před 6 měsíci +1

    @naveenautomationlabs loved the explanation . Its actually amazing how you take this valuable time in explaining and putting out the most relevant explanation. Actually a FAN of yours.

  • @GibyAlex0606
    @GibyAlex0606 Před 2 lety +1

    Thanks Naveeen , this is Awesome explanation

  • @VaniDatta
    @VaniDatta Před 3 lety +1

    Hi, Naveen! Many thanks for your classes. They are awesome. Can you make captions available for all of your classes, please?

  • @farazahmad9009
    @farazahmad9009 Před 3 měsíci

    Glad I came across this video. What a wonderful explanation. Thanks a lot!!

  • @MrYashMundey
    @MrYashMundey Před 3 lety +1

    I will never forget this now. Thank you for making it so easy :)

  • @maheshuma741
    @maheshuma741 Před 2 lety

    Superb explanation. I have never seen such a clean explanation. Thank you bro. Do more videos on tricky concepts like this

  • @naveenkumarchowki6717
    @naveenkumarchowki6717 Před 3 lety +2

    Thanks for give the information, I have learned so much...now I can explain got the clarity about how hash map exactly work internally...

  • @AbsolutelyAJYoutube
    @AbsolutelyAJYoutube Před 3 lety +1

    thanks for creating this video , helped me a lot in understanding this concept.

  • @SomeshwarPhulari
    @SomeshwarPhulari Před 3 lety

    Awesome! made me consontrate and understand perfectly. Thanks....

  • @busijagannathrao2915
    @busijagannathrao2915 Před 2 lety +1

    Awesome explanation, but if the hashing explanation is more, like how it's calculating in which node the value will be inserting, then it will be the best-ever i saw in youtube.

  • @anupdeshmane8827
    @anupdeshmane8827 Před rokem +1

    Its awesome easy to understand

  • @amrendrakumar4280
    @amrendrakumar4280 Před 2 lety

    theory with practical ,very well explained

  • @SarangHoley
    @SarangHoley Před 3 lety +13

    Thanks for the video Naveen, very few content creators covers this topic, and like this till now not available on CZcams 😊👍👍

    • @naveenautomationlabs
      @naveenautomationlabs  Před 3 lety +1

      Glad you liked it

    • @arnavpatil583
      @arnavpatil583 Před 3 lety +1

      Already cover this topic before 2 years check the links
      czcams.com/video/CojCE-ojdGY/video.html

    • @ankitmahajan8295
      @ankitmahajan8295 Před 3 lety +2

      @@arnavpatil583 but naveen's explanation is at different level. he explained it really well.

    • @jugautomation3102
      @jugautomation3102 Před 3 lety

      @@ankitmahajan8295 I agre.

    • @SarangHoley
      @SarangHoley Před 3 lety

      @@ankitmahajan8295 Absolutely correct Ankit, I am completely agree with you.

  • @vijayaraghavanvashudevan1977

    Awesome ♥ same index positions for Naveen and Tom. Thank you bro :)

  • @nivedaravi2241
    @nivedaravi2241 Před 3 lety +1

    wonderful explanation

  • @acridpoet2766
    @acridpoet2766 Před 2 lety

    Great video, absolutely great!

  • @user-jz2up8hp3e
    @user-jz2up8hp3e Před rokem

    Thank you for making this video. Loved your explanation, such an amazing content.

  • @shobhitagarwal9321
    @shobhitagarwal9321 Před 3 lety

    Thanks Naveen, really nice presentation.. 👍

  • @tannubajpai4782
    @tannubajpai4782 Před 3 lety +1

    best video Sir
    Keep posting Sir

  • @srianshworld3942
    @srianshworld3942 Před 3 lety +1

    Excellent explanation

  • @shalinianumula2108
    @shalinianumula2108 Před rokem

    thankyou for explaining so clearly..

  • @sumitchaturvedi5933
    @sumitchaturvedi5933 Před 3 lety

    Excellent Explanation, Thanks, Bro...

  • @PravasaBharathiyaTelugodu

    its very good and you have captured all the key points.
    keep rocking .. Thanks

  • @hemanthhemasurya8735
    @hemanthhemasurya8735 Před 2 lety +1

    this was really nice bro..thanks

  • @jugautomation3102
    @jugautomation3102 Před 3 lety +1

    Amazing Naveen sir... today I got to know what is hashing and hashmap. thank u so muchh sirr.

  • @anurani7084
    @anurani7084 Před rokem

    Wonderful and clear explanation 👏👏

  • @likithahs2469
    @likithahs2469 Před rokem

    really good. Thank you for posting the video. Very well explained

  • @nithyarajaram9464
    @nithyarajaram9464 Před 2 lety

    Very well explained. Thanks a lot

  • @sangamdavangave4039
    @sangamdavangave4039 Před 4 měsíci

    Thanks a lot. It is a perfect explanation.

  • @sujitharavuri3572
    @sujitharavuri3572 Před 16 dny

    Really appreciate this quality content.Thanks a lot.

  • @priti436
    @priti436 Před 2 lety +1

    Best explanation found 😍

  • @titusjennipalli4106
    @titusjennipalli4106 Před měsícem

    Great explanation, Thanks

  • @panneerselvam.k1613
    @panneerselvam.k1613 Před 4 měsíci

    Really now only i can able to understand
    Thanks Bro

  • @kotireddy5272
    @kotireddy5272 Před 2 lety

    Great bro that's amazing explanation and easy to understand

  • @pratikjadhav7407
    @pratikjadhav7407 Před 3 měsíci

    Good way of teaching & explanation Sir.

  • @fathimasifasyedmusthafa9410

    Well Done ... worth watching .. !!

  • @Fun_Flicksss
    @Fun_Flicksss Před 2 lety +1

    was very helpful thank you