Really liked the idea of explaining through slides also. And thanks for explaining the functionality for Java 7 and Java 8 separately; insightful indeed.
@CodeDecode3 жыл бұрын
Thanks Rahul 🙂👍
@praphulyadav447110 күн бұрын
I am really thankful for your videos I just wanted to share that Hashcode is not the parameter for branching in the collision. When a HashMap in Java (Java 8 and later) encounters a bucket with many collisions, it may convert the linked list of entries in that bucket into a balanced tree (specifically a red-black tree). However, the hash code itself is not directly used as the branching variable in the tree; instead, the key's natural ordering or a comparator (if provided) is used to maintain order.
@sanyasee172 жыл бұрын
The Best Video to understand Internal working of HashMap. Thanks a lot ❤
@vijayavinayaktandur95992 жыл бұрын
Thank you so much @code decode guys for your support. I cleared multiple interviews with your valuable videos. Hats off
@CodeDecode2 жыл бұрын
thanks and all best Vijay for your future
@shreyashachoudhary480 Жыл бұрын
Best video I've ever seen about HashMap's working!
@CodeDecode Жыл бұрын
Thanks Shreyash 🙂🙂
@smitchaudhari97832 жыл бұрын
This channel is underrated! Great work.
@CodeDecode2 жыл бұрын
Thanks for nice words
@ssbunny1112 жыл бұрын
Hi Mam, All you videos are excellent and very helpful to clear interviews. Your are doing this video at 1 AM... Hatsoff to your dedication
@CodeDecode2 жыл бұрын
Thanks a lot 🙂🙂. Yeah that's when we get spare time after office ends 😃. We all are working IT professionals. Btw nice observation 👏👏
@rajatgoyal2812 Жыл бұрын
I was searching for this type of video for a long time. This video is very informative and helped me better understand the concepts. Thanks for sharing such insightful content.
@CodeDecode Жыл бұрын
Thanks 🙏🙏👍
@shekhar_sahu2 жыл бұрын
Thank you for taking us through the source code of these classes. I used to be afraid of checking such files. But this is how we get to learn good coding practice also.
@CodeDecode2 жыл бұрын
Very true Shekhar. Very glad to see u are going through them. 👏👏👏
@saivamsi48113 жыл бұрын
Hi Mam! You are helping us a lot. Please keep teaching like this And also if possible please make a complete session on Collections frame work end to end. There are many tutorials on youtube, but nobody can teach us the way you do. I found your tutorials very helpful and easiest way to understand.
@CodeDecode3 жыл бұрын
Sure Sai. Thanks a ton for the nice words. We do have videos on collection framwork. Can u plz tell what all topics u need apart from what are uploaded.
@saivamsi48113 жыл бұрын
@@CodeDecode Linked List, Stack, Vector, HashSet Vs LinkedHashSet Vs TreeSet..Thanks in Advance..
@DevanshuKumar-o5r Жыл бұрын
You delivered a nice explanation. It was needed for interview because it is important. I found this video and it helped me out. Thanks.
@CodeDecode Жыл бұрын
Thanks Devanshu 🙂👍
@anison111111 ай бұрын
Simple and accurate explaination - good job
@CodeDecode11 ай бұрын
thanks
@ArunSharma-hu4td3 жыл бұрын
Excellent explanation of internals of hashmap as well as hasheet with proper proof
@CodeDecode3 жыл бұрын
Thanks Arun 🙂👍
@ArunSharma-hu4td3 жыл бұрын
@@CodeDecodeone video for arrayList internals
@kaushalchandra98244 ай бұрын
Thanks Mam for such à deep knowledge. God Bless you. Keep posting 🎉
@aniketkalamkar2273 жыл бұрын
Wonderful video explaining exactly what changed with Java8. Can you please create one for ConcurrentHashMap as well
@CodeDecode3 жыл бұрын
Thanks 🙂Sure Aniket 🙂👍
@akankshasinha33522 жыл бұрын
Thankyou so much dear❤ your videos are good to go for interview topics.. crisp and perfect .. Interviewer bhi khush hojaye😂
@CodeDecode2 жыл бұрын
Haha Thanks a lot Akanksha🙂🙂 and we will be happy when u land at awesome job Girl ❤❤. Keep learning keep rocking girl 🎊🎊👍👍👍👍🎂
@divyavegoti46093 жыл бұрын
Have been checking all your videos..Inspiring work and content!!!
@CodeDecode3 жыл бұрын
Thanks a ton Divya 🙂
@raghuakuthota49003 жыл бұрын
Too good of explanation :) thanks lot - great work - keep going
@CodeDecode3 жыл бұрын
Thanks Raghu 👍🙂
@sandiyr1989 Жыл бұрын
you r an amazing teacher..
@CodeDecode Жыл бұрын
Thanks 🙂
@yasirakhn Жыл бұрын
The content is really great, explaining everything in details which makes the internal working of HashMap and HashSet very clear. However, I have one question. Do we need this understanding for programming in real projects as generally we need to use HashMaps and HashSets to store and retrieve collection data and can also iterate using iterators, or is this just for interview purpose ?
@GauravSharma-up9gs3 жыл бұрын
Thanks, Your channel is very helpful...
@CodeDecode3 жыл бұрын
Thanks a ton Gaurav. It means a lot 👍🙂🙂👍
@reshusinghal82982 жыл бұрын
Ur videos are too good to prepare for interview. I have a question here. Whe linked list is converted into binary tree then which hash code is used to determine the left or right node? As per my understanding hash code of all keys is same because of which collision is happening so now which hash code to use for node calculation?
@vickybhoir30176 ай бұрын
nice explaination
@CodeDecode6 ай бұрын
Thanks
@ganeshahiwale4899 Жыл бұрын
Really liked the explanation can you please create a telegram channel so that we can have communication and polling advantage and discuss our doubts
@vndprasadgrandhi70243 жыл бұрын
Thank you very much.. Could you please do if possible tree set and tree map
@CodeDecode3 жыл бұрын
Nice topic. Sure we will do that
@rajyalakshmi30773 жыл бұрын
Thanks! Could you please do a video of executor service future get and completablefuture from java how to handle if anyone executor service tasks takes too long
@CodeDecode3 жыл бұрын
Nice topics Rajya, we will surely put video on these
@vinayuddagiri3 жыл бұрын
Very good Explanation.
@CodeDecode3 жыл бұрын
Thanks Vinay 🙂👍
@krishnarohit31663 жыл бұрын
Awesome Explanation
@CodeDecode3 жыл бұрын
Thanks Krishna 🙂👍
@sreejak67763 жыл бұрын
Thankyou for the video mam
@CodeDecode3 жыл бұрын
You're welcome sreeja
@abhishekjain65593 жыл бұрын
Nice explanation.. Great help .. thanks
@CodeDecode3 жыл бұрын
Thanks Abhishek 🙂👍
@anonymousxyz38562 жыл бұрын
excellent explanation
@CodeDecode2 жыл бұрын
Thanks 🙂🙂
@akashkarn84292 жыл бұрын
After finding such great videos, I am feeling blessed :D Thanks a lot !
@akashkarn84292 жыл бұрын
This is pure Quality Content !!
@CodeDecode2 жыл бұрын
Thanks a lot Akash 🙂👍
@phanimc11211 Жыл бұрын
neatly explained what changed with Java8
@CodeDecode Жыл бұрын
Thanks
@aneelakar4003 жыл бұрын
Great explanation Mam.
@CodeDecode3 жыл бұрын
Thanks 🙂👍
@salmanpatel29682 жыл бұрын
nice explanation keep it up we will support you and my request to you please make a video on time complexity and space complexity
@CodeDecode2 жыл бұрын
Yeah that's s tough one to understand. We will create video on that soon 👍👍
@salmanpatel29682 жыл бұрын
@@CodeDecode thanks pl create on that topic
@vaibhavjain89392 жыл бұрын
Next Level
@CodeDecode2 жыл бұрын
Thanks Vaibhav 🙂🙂👍👍
@mahi2082 Жыл бұрын
Nice explanation
@CodeDecode Жыл бұрын
Thanks 👍
@maartensnels38043 жыл бұрын
Keep up the good work!
@CodeDecode3 жыл бұрын
Thanks Maarten 🙂👍
@amarthyaseshu6833 жыл бұрын
Thanks for sharing!
@CodeDecode3 жыл бұрын
🙂👍
@shivamanand9836 Жыл бұрын
13:32 “while converting the list to binary hashcode is used as branching variable” - couldn’t get this part as hashcode is same then they are getting converted to linked list and then equals method is being used to add the values in the linked list. So the question is if it has reached a certain threshold and then how different values of hashcode can come to get converted into tree?
@simplegirl22183 жыл бұрын
Mam, please make a video on multi threading concepts..with basic and advanced ..
can you plz explain about memory allocation enhancement in 1.8 feature.
@shashwatidash85246 ай бұрын
I have a doubt if anyone could help. Since all entries within a bucket index have the same hash code (due to being placed in the same bucket), how can the hash code determine an Entry object's placement to left or right. Instead, the Comparable interface or custom comparator only will be used to maintain the ordering within the binary tree. Am I getting it right? Since not the whole bucket is changed to a Binary tree, only a particular bucket index is!
@chinmayd40934 ай бұрын
@shashwatidash8524 as per my understanding, the first element(for particular bucket) which you will be adding , will be acting as root node of that tree.
@sravanreddyreddy3562 Жыл бұрын
Just a feedback - There is too much of juggling btw screens...
@CodeDecode Жыл бұрын
Understood. We will try to reduce it. 👍👍
@jerinxavier53809 ай бұрын
How can we use hashcode to compare elements while adding to the binary tree. Unless the hashcode was the same we wouldn't push in the same bucket. Right.?
@vengateshm21223 жыл бұрын
Thank you!
@CodeDecode3 жыл бұрын
🙂👍
@aswinkumar67968 ай бұрын
Hi I have one doubt In bucket, all elements with same hascode only? Is it possible, different hashcodes in same bucket as you mentioned in video@13:59?
@anisha97094 ай бұрын
I guess it should be when 2 keys that are different but having same hashcode?
@kudumulasivaramakrishnared63793 жыл бұрын
Please continue all data structures (linear,non linear in graphs, hash table)
@CodeDecode3 жыл бұрын
Sure 🙂👍
@kamallochannayak27063 жыл бұрын
Great mam...
@CodeDecode3 жыл бұрын
Thanks 👍🙂
@rahulingole49236 ай бұрын
still usefull video
@CodeDecode6 ай бұрын
😊
@kanchankatkar52268 ай бұрын
If same hashcode is there then what will happen in binary tree fornat how key can be comparable will you give example, it's confusing for me
@rajatgoyal2812 Жыл бұрын
At 14:12 you mentioned that in tree the main comparison will be on the basis of hashcode, But in a bucket when there are several entries and all of them have same hashCode then how are we comparing on the basis of hashCode.
@rasolutions86762 жыл бұрын
Dose Linked List in the bucket (specific index calculated after hashing) is going to convert to tree or is it the complete bucket is getting converted into tree a) if it is linked list at specific bucket index then how the hashcode less or greater then calculation will happen as per me at that point hashcode would be same for both element isn't it? b) if the complete bucket is getting converted into tree then why we are saying linked list will get convert to tree...if i heard right! 🤔🤔🤔 Please help me understand the concept
@arinbose63662 жыл бұрын
Thanks but do you have video of say passing hashmap as parameter etc
@CodeDecode2 жыл бұрын
What do u need? M unable to understand the requirement. Can you plz elaborate?
@arinbose63662 жыл бұрын
@@CodeDecode I was looking for below found it ,in future can you show some examples like say taking hashmap as parameter, taking hashmap returning list etc, no need for video you can post in github that would help, for you these might seem very simple and common task but for starters this would help a lot,thanks again for all your videos. // returning hashmap public HashMap asHashMap( K[] keys,V[] values ) { HashMap result = new HashMap(); if (keys == null || values == null || keys.length != values.length ) throw new IllegalArgumentException(); for (int i =0; i
@arinbose63662 жыл бұрын
@@CodeDecode I had just given a suggestion,otherwise learnt a lot from your video series 👍
@tejasnerkar1330 Жыл бұрын
do you have link for all the presentation slides that we can access? It will be really helpful to go through it as a revision before interview.
@satyajeethukkire6099 Жыл бұрын
Maam, most of the comment section has the doubt of collision at 14:29 please explain the doubt, it is really confusing
@suvch58423 жыл бұрын
Do you have any java course from beginner level to advanced in Core to Advanced java
@shivachanda2438 Жыл бұрын
Very good explanation, but I have a doubt: while explaining handling collisions in java8 nd above, u mentioned that if the hash code is same in a bucket, then we go with comparing keys , but collision is caused because of same code na, my doubt is all the entries in a bucket will having same hashcode ryt that is how they are placed in a bucket , keys may be different but hascode remains same based on hashcode only we are choosing the bucket na, please clear my doubt.
@CodeWithCB Жыл бұрын
All entries in a bucket may not have same hash value though they will have same index. Remember we first calculated hashcode which again converted to some hash value. This hash value is then mapped to some index. And this is the point where two different hash values may result in same index. So while doing get operation first hash values are equated and then keys are equated.
@shivachanda2438 Жыл бұрын
@@CodeWithCB sry what do u mean by hash code and hash value both are same ryt , for a given key we will find hashcode , what is hash value. I didn't get u, please elaborate
@CodeWithCB Жыл бұрын
@@shivachanda2438 internal implementation of Hashmap frist calculates hashcode of key as per hashcode() given for key object. Then internally it converts this hashcode to hashvalue h using formula (h = key.hashCode()) ^ (h >>> 16) . This is done to spread keys across the array causing less collisions. And this hashvalue is used further to find actual index using formula index = (n - 1) & hash.
@noorahameds8 Жыл бұрын
How will it work if the value is a list Map m = new hashmap();
@RANDOMGAMER-nq6jf Жыл бұрын
14:29 im having doubt on why there will be different hashcodes in same bucket??
@chiragshah9171 Жыл бұрын
Yea.. same doubt. Linked list gets created when there is hash collision then how can be there different hash code values
@chiragshah9171 Жыл бұрын
14:29 how can we have different hash values if there is hash collision, it's bit confusing there 😮
@djinthemix333 ай бұрын
I hope to be that fortunate winner... Plz Like✓ SHARE✓ SUBSCRIBE✓
@hackstreet7812 жыл бұрын
From where do you learn Java ? I also want to read from there.
@CodeDecode2 жыл бұрын
Mostly docs helps us a lot in understanding the concepts
@arulantony21373 жыл бұрын
traversing linked list and tree logn and O(n) then how hashmap complexity isO(1) ?
@CodeDecode3 жыл бұрын
It's said best case complexity o(1) worst case o(logn)
@Sanjaykumar-nz4tf Жыл бұрын
Hi Mam, I have a doubt in the put() method of hashmap.. If the hashCode of few keys are same means all those will be stored inside same bucket in linked list format (if threshold is increased by 8 means it converts to balanced tree) * Right branch will be higher value of hashCode and left will be lower than that.. My Doubt is all the variables present in same bucket will have same hashCode.. Then how they will be compared while storing in balanced tree?
@AshishKumar-vj7fq10 ай бұрын
I also have the same doubt. How different hashcode can be present in same bucket because different objects will land on same bucket only when hashcode for them is same.
@malaiarasi44002 жыл бұрын
Hashmap concept was awesome.. Hashset is not much clear.
@CodeDecode2 жыл бұрын
How can we help Malai? What is unclear can u plz tell us so that we can clarify that to u?
@malaiarasi44002 жыл бұрын
Mam i went through the video again now it's clear. Thanks
@CodeDecode2 жыл бұрын
Awesome Malai 🙂👍
@9-19398 ай бұрын
👌👌👏👏👏🙏
@rohitkapade1130 Жыл бұрын
14:29 in second point how come is this possible that in one bucket will have keys with different hashcode as we assigned bucket on basis of hashcode itself. I guess binary search tree is based upon keys.
@RANDOMGAMER-nq6jf Жыл бұрын
I'm also having the same doubt. The hashcode enters the bucket only if it is same and the keys are used to compare amongst the elements in that bucket. Im confused here..please explain here....
@lakshmaiahyannagiri2912 жыл бұрын
please share the document of this class
@CodeDecode2 жыл бұрын
Which document are you asking for Lakshmaiah?
@kanikanarwat8262 жыл бұрын
Hi what will happen if we have overriden equals method but it always returns true.
@MHK9582 жыл бұрын
Just do it in eclipse, if equal returns true every time then i think hashmap will store only 1 key if same has code come
@PankajPatil-kw9ic3 ай бұрын
1:27 Explain slowly
@prasadsatpute51975 ай бұрын
Didi please please please please Me and You not going anywhere. If we learn well or quickly, it does not mean that you speak so fast. Please explain with some breath at normal speed or read calmly bs itna kahen hai please mam please
@harshwardhanshetty46834 ай бұрын
use chatgt thats way more clear
@BaluKompalli2 жыл бұрын
Explanation fine but i am unable to catch that flow. Listened more than 3times. Little bit confusion. Could you please explain in less technical way. Atleast one simple example
@CodeDecode2 жыл бұрын
Sure we will do that👍👍
@BaluKompalli2 жыл бұрын
@@CodeDecode I listened in very slow motion and put a diagram in a paper. Then i understood the concept. I think it is fine for me. No need to do any other video with examples. Another thing is , I tried to donate thank you, but not redirecting to payment page. Will check and update you again.
@koushikpan1320 Жыл бұрын
why is your voice shivering. Looks like you are worried of something. 👀
@CodeDecode Жыл бұрын
It might be cold here or mic u Issues. Not sure. We will check 🙂👍
@akshayaggarwal6364 Жыл бұрын
it was bit confusing
@suhilirshad4 ай бұрын
very confusing explaination . please make it short and understandable for interview pont of view purpose
@saaii9 Жыл бұрын
Hi mam can I know your name
@CodeDecode Жыл бұрын
Hello. You can call us team code Decode ❤️. Happy to be connected 🙂
@amitmapari39310 ай бұрын
Bad explanation
@CodeDecode10 ай бұрын
Hi Amit. Can you please suggest what went Wrong ? We will try to rectify the issue you faced