Комментарии:
you said that the capacity will be increased if 12 buckets will be full (for initial capacity = 16), but if i try to use class, which hashCode() always returns 1, as a key, then all the new pairs will be stored in one bucket with index 1 and according to debugging the capacity will still be increased. doesn't this mean that the load factor depends on the number of pairs in the hash map? not on the number of buckets with pairs
ОтветитьA great explanation ,one of the best video till now i watched on Hashmap internal...Thank you for sharing a such content😊
ОтветитьGood lecture. Helpful
ОтветитьKindly note that when hashmap is passed the duplicate key, it calls the hashCode() method to generate the hash value for the key and this hash value helps in determining where to put this new entry but since this index/position already has one entry. Since each bucket stores the entry/ies in the form of a linked list so new entry will be added at the top/right end of the linked list. The same logic will be applied if another duplicate key arrives. Please note, when we try to retrieve the value by passing the key(which is duplicate in nature), hashmap goes to the appropriate index by calculating the hash value and traverses the linked list, and returns the most recent value as all the keys are same.
Ответитьamazing explanation, thank you
ОтветитьOne of the best tutorial for this topic
ОтветитьSuper Awesome. This is what I was looking for.
ОтветитьThanks, It's really neat & clear explanation🎉🎉
Ответитьxactly what the doctor ordered.
ОтветитьVery nice explanation.Thank you
ОтветитьSir plz provides notes
Ответитьvery good explanation
Ответитьvery good explanation...
ОтветитьVery easy to understand. Thank you!
ОтветитьCan you make videos on spring and springboot
ОтветитьVery nice explanation
ОтветитьExcellent explanation worth a watch🔥🔥
Ответитьyou can use a primitive type as a key in a HashMap. When you add a primitive type as a key, Java will automatically wrap the primitive value in an object of the corresponding wrapper class
ОтветитьTill now i have seen so many videos about the HashMap collision, this is one which explains every thing without any chance of doubt. Great great Job..........!!!🤩
Ответитьwell explained... good one
ОтветитьAwesome explanation Sir....
ОтветитьThis video is very helpful to me and the example with the diagrams clears all doubts , bt still having one doubt how can I calculate the index using given formula? Can you please describe it?
ОтветитьThank you for the clear explanation
ОтветитьGreat session, neat and good explanation. Thank you
ОтветитьVery cool keep it up
ОтветитьThank you for the explanation!
ОтветитьAwesome Explanation
ОтветитьThanks for making life easier
ОтветитьThanks man! You made it far easy...
Ответитьyour explanation is great . try to make more videos on java .
ОтветитьNice video
ОтветитьBest video I have come across....It would be great if you can add tutorials on multi-threading and concurrency topics....
ОтветитьTysm for simply explanation... I have seen much vdo bt this is the best vdo.. Tq once again..🙏🏻
ОтветитьThank you so much sir....🙏
Ответитьsimple explain for tricky topic, easily understandable.. nice.. 👍
ОтветитьAwesome❤
ОтветитьBhai Kya explain Kiya hai..Thank you so much...Can you please create video on ConcurrentHash map, Difference between Hashmap, Synchronized Hashmap and Concurrent hashmap
ОтветитьNice Explanation
Ответитьcould you please elaborate more on how equal hashcode strings will be saved in same buckets ?
You have mentioned compareTo () method will be use. But more detailed explanation might help. Thank you.
that was some explaination 😎
ОтветитьGood going mate. Keep it up.
ОтветитьCan uh make more videos on Java
ОтветитьAccording to keys, pair is searched, not as per Bucket number
Hence, one bucket can have many pairs linked by LinkedList
Best Explanation ever…have seen so many videos but this is the best, Thank you 🙏
ОтветитьYou are awesome at explaining complex topics. Thank you.
ОтветитьHow to find bucket index plz explain...
ОтветитьAppreciated the way you explained the concept. Thank you.
ОтветитьGood explanation 👍
ОтветитьI have never seen such detailed tutorial about the hashmap! I want to thank you, even I knew how it works.
ОтветитьThank you so much for this video I was actually able to visualise internal structure of the hashmap
Ответить