HashMap in Java | How HashMap Works in Java | Internal Implementation of HashMap

  Рет қаралды 21,777

Byte Programming

Byte Programming

Күн бұрын

Пікірлер: 33
@amitsrivastava9162
@amitsrivastava9162 3 жыл бұрын
From java 8 onwards, when linked list is formed for same index values, after threshold value=8 the linked list restructured into balanced binary tree. So that the complexity is O(log n) as list complexity is O(n) in worst case.
@nr0913
@nr0913 3 жыл бұрын
nice explanation. simple to understand!!
@ashrafm3564
@ashrafm3564 2 жыл бұрын
Sahi h boss hat's off
@vasunttfshimoga
@vasunttfshimoga 3 жыл бұрын
Very clean and detail explanation!
@DanielLpz1
@DanielLpz1 3 жыл бұрын
Very helpful and clean
@karismachoudhury222
@karismachoudhury222 4 жыл бұрын
Nice explanation...
@tadurirk
@tadurirk 4 жыл бұрын
Nice explanation thanks
@nikhiljose2029
@nikhiljose2029 4 жыл бұрын
Super explanation
@Daxbedivlogs
@Daxbedivlogs 4 жыл бұрын
Nice tutorial .. do you also give live coaching for frameworks , microservices or devops?
@ByteProgrammingVedantHarish
@ByteProgrammingVedantHarish 4 жыл бұрын
@DAX Not yet! Any special topic you are looking for?
@ByteProgrammingVedantHarish
@ByteProgrammingVedantHarish 4 жыл бұрын
@@Daxbedivlogs Sure, i will put some full stack video solutions. Stay tuned!
@titaneden7825
@titaneden7825 3 жыл бұрын
InstaBlaster
@ladeharish5514
@ladeharish5514 4 жыл бұрын
Nice explanation, please do the same for ArrayList and LinkedList. Expecting more videos. Please do more videos by covering all the concepts
@ByteProgrammingVedantHarish
@ByteProgrammingVedantHarish 4 жыл бұрын
Sure ! Stay tuned
@prabhuchandran8367
@prabhuchandran8367 3 жыл бұрын
Excellent explanation .. keep going
@ByteProgrammingVedantHarish
@ByteProgrammingVedantHarish 3 жыл бұрын
Glad you liked it
@ChetanJain1507
@ChetanJain1507 3 жыл бұрын
Nice tutorial, thank you.
@ByteProgrammingVedantHarish
@ByteProgrammingVedantHarish 3 жыл бұрын
Glad it was helpful!
@kevalsheth9639
@kevalsheth9639 4 жыл бұрын
Great video! Please make a video on hashCode and equals.
@ByteProgrammingVedantHarish
@ByteProgrammingVedantHarish 4 жыл бұрын
Sure! Stay tuned!
@at_tap
@at_tap 3 жыл бұрын
very good
@sergialabartcastro6688
@sergialabartcastro6688 4 жыл бұрын
Does it work with consecutively inputs? For example: ABC = 123 A=1 B=2 C=3
@ByteProgrammingVedantHarish
@ByteProgrammingVedantHarish 4 жыл бұрын
@Sergi I might have understand a bit differently from you about your point. If that's happened, please brief me. How is see HashMap : 1. HashMap works on key-value pair where key needs to be unique. Why unique key? 2. hashcode is calculated from the key and it influences determination of bucket location. Bucket Loc = hashcode & (n-1) Example : For string class, Hashcode calculation = s[0]*31^(n-1) + s[1]*31^(n-2) + ... + s[n-1] here s[i] is the character and n is the length. For any custom class : good to implement the hashcode. 3. You might end up with same hashcode, might result in same index and hence collision. Even if you have different hashcode, still might end up at same index, hence collision again. 4. If inserted another value with same key, previous value would be replaced with new value and output of this put operation will be previous value. Above scenario : 1. All keys are unique. So, Insertion of all value to hashmap.
@sergialabartcastro6688
@sergialabartcastro6688 4 жыл бұрын
Thanks, but I think thai this is not exactly what I meant. When the program is finished I want to introduce some values without gaps and get the keys. Is that possible?
@ByteProgrammingVedantHarish
@ByteProgrammingVedantHarish 4 жыл бұрын
@@sergialabartcastro6688 If not wrong, are we trying to populate data into hashmap in sequential manner? At index0, then 1, then 2 and so on?
@sergialabartcastro6688
@sergialabartcastro6688 4 жыл бұрын
It is not sequential. You can write all the values you want without gaps
@ByteProgrammingVedantHarish
@ByteProgrammingVedantHarish 4 жыл бұрын
@@sergialabartcastro6688 still not getting "without gaps" . can you describe more or send detailed steps plz, describing what you are trying to achieve.
@kevalsheth9639
@kevalsheth9639 4 жыл бұрын
Waiting for Java Collections Part 2
@ByteProgrammingVedantHarish
@ByteProgrammingVedantHarish 4 жыл бұрын
@Keval Soon it would be available
@priyagade8788
@priyagade8788 3 жыл бұрын
Thank you sir
@ByteProgrammingVedantHarish
@ByteProgrammingVedantHarish 3 жыл бұрын
Stay tuned!
@gowthamchakravarthi6982
@gowthamchakravarthi6982 3 жыл бұрын
Bro reply me: Index calculation explain comment bro Index = 66 & (15-1) How to calculate bro (&) => symbol what we take bro.
@ByteProgrammingVedantHarish
@ByteProgrammingVedantHarish 3 жыл бұрын
Bitwise and operator
Collection Concepts & Interview Questions (Part-1)
20:59
Byte Programming
Рет қаралды 16 М.
😜 #aminkavitaminka #aminokka #аминкавитаминка
00:14
Аминка Витаминка
Рет қаралды 1,4 МЛН
黑的奸计得逞 #古风
00:24
Black and white double fury
Рет қаралды 16 МЛН
Seja Gentil com os Pequenos Animais 😿
00:20
Los Wagners
Рет қаралды 27 МЛН
What's in the clown's bag? #clown #angel #bunnypolice
00:19
超人夫妇
Рет қаралды 12 МЛН
01. Internal Working of HashMap & Java-8 Enhancement
19:11
Ankit Wasankar
Рет қаралды 116 М.
Lambda Expressions in Java - Full Simple Tutorial
13:05
Coding with John
Рет қаралды 754 М.
How HashMap works in Java? With Animation!! whats new in java8 tutorial
15:29
Ranjith ramachandran
Рет қаралды 1 МЛН
Map and HashMap in Java - Full Tutorial
10:10
Coding with John
Рет қаралды 585 М.
Junior Developer Sent Me A PR For Review
17:26
Amigoscode
Рет қаралды 168 М.
14.11 HashMap and HashTable in Java
8:44
Telusko
Рет қаралды 684 М.
😜 #aminkavitaminka #aminokka #аминкавитаминка
00:14
Аминка Витаминка
Рет қаралды 1,4 МЛН