LinkedHashMap and LinkedHashSet in Java | Internal Working

  Рет қаралды 22,813

Daily Code Buffer

Daily Code Buffer

Күн бұрын

Пікірлер
@srinukolluris
@srinukolluris 2 жыл бұрын
I have lot of confusion in-between LinkedHashMap vs LinkedHashSet , now everything is cleared, thanks bro, great work.
@DailyCodeBuffer
@DailyCodeBuffer 2 жыл бұрын
🙏🏻🙏🏻
@erwinrussel2086
@erwinrussel2086 Жыл бұрын
Thanks!
@DailyCodeBuffer
@DailyCodeBuffer Жыл бұрын
Thank you so much 🙏🏻🙏🏻
@gauravsrivastava17
@gauravsrivastava17 2 жыл бұрын
Plz keep making videos And you are completing the whole Video in the particular topic Makes this channel best place to visit and see
@DailyCodeBuffer
@DailyCodeBuffer 2 жыл бұрын
Thank you so much 😊
@ShinAkuma
@ShinAkuma 2 жыл бұрын
Would you consider making a DSA series ? Covering programming techniques for solvnig different kinds of questions and Data structure related questions asked in FAANG companies.
@DailyCodeBuffer
@DailyCodeBuffer 2 жыл бұрын
Planning on it if more people are interested
@gopichinthagumpula6481
@gopichinthagumpula6481 2 жыл бұрын
​@@DailyCodeBuffer Yes.. do it please
@balachandra6392
@balachandra6392 2 жыл бұрын
@@DailyCodeBuffer : please consider LLD videos also.
@vinaykulkarni4085
@vinaykulkarni4085 2 жыл бұрын
@@DailyCodeBuffer Please create as these are things which I feel most of people lack and fail when asked in interviews
@PremSagarBhamidipati
@PremSagarBhamidipati 2 жыл бұрын
Please do it.
@nikhilvijay6022
@nikhilvijay6022 5 ай бұрын
Great work as always❤
@DailyCodeBuffer
@DailyCodeBuffer 5 ай бұрын
Thanks 🙏
@sanketh768
@sanketh768 Жыл бұрын
Thank you for the video sir, didn't think I could find the explanation so easily
@DailyCodeBuffer
@DailyCodeBuffer Жыл бұрын
Glad it helped
@azimbekomar4401
@azimbekomar4401 Ай бұрын
Perfect explanation! Thanks a lot!
@dipanmandal7607
@dipanmandal7607 Жыл бұрын
Boht badiya. Too good.
@shakhzodrasulov
@shakhzodrasulov Жыл бұрын
Thank you a lot! Your explanation is cool and it helped me understand how LinkedHashMap works internally!
@DailyCodeBuffer
@DailyCodeBuffer Жыл бұрын
Glad it was helpful!
@vinaykulkarni4085
@vinaykulkarni4085 2 жыл бұрын
Hi Shabber it was a clear and easy explanation. Please add a video on internal working of ConcurrentHashMap
@DailyCodeBuffer
@DailyCodeBuffer 2 жыл бұрын
Thank you so much Working on it
@ShinAkuma
@ShinAkuma 2 жыл бұрын
It's the same as HashMap except it does it's write operations in a monitor region and applies a segment level lock on the buckets so only the buckets where data is being written are locked and rest are free for use. Read operations do no require locks at all.
@Lallushe
@Lallushe Жыл бұрын
@@DailyCodeBuffer Concurrent hashmap YES PLS
@faixan13
@faixan13 2 жыл бұрын
Thanks for the detailed explanation. One question what about the uniqueness of elements ? Because it is unique in set always so it will always be unique in linked hashset also?
@DailyCodeBuffer
@DailyCodeBuffer 2 жыл бұрын
Yes
@MutantBikers
@MutantBikers 2 жыл бұрын
Happy to see you again bro 🙂🙂
@DailyCodeBuffer
@DailyCodeBuffer 2 жыл бұрын
Thanks buddy 🙏🏻
@RaviKumar-vk6ib
@RaviKumar-vk6ib Жыл бұрын
Love you buddy cleared my concept totally
@DailyCodeBuffer
@DailyCodeBuffer Жыл бұрын
Glad it helped
@brahmamk7771
@brahmamk7771 2 жыл бұрын
If hash collision happens then how linkedhashmap() works internally? . Thanks in advance
@saisreenath4199
@saisreenath4199 Жыл бұрын
Well explained.
@gopichinthagumpula6481
@gopichinthagumpula6481 2 жыл бұрын
Will you make a video on Oops.. if possible?
@TechOnScreen
@TechOnScreen 2 жыл бұрын
amazing explanation !
@DailyCodeBuffer
@DailyCodeBuffer 2 жыл бұрын
Thanks 🙏🏻
@kunalsharma-zc2ho
@kunalsharma-zc2ho 2 жыл бұрын
can you made an vedio on Equals and hashcode also with various cases..sometimes it comes confusive : (
@mihirshinde4268
@mihirshinde4268 2 жыл бұрын
What is the Difference between Node and a Entry ?
@sufyankhot7520
@sufyankhot7520 2 жыл бұрын
What if the key is an object? Will the next and before be resolved by sorting whatever is returned by the hashcode()?
@dmitrikonnov922
@dmitrikonnov922 2 жыл бұрын
Besides of delicacy going hand in hand with making use of objects as keys in HashMap: At first: hashcode() on your key-object is called, after that the link to your object is copied into the array's node, after links "next" and "before" (or whatever they're called in java) are renewed, pointing to the node. Were your key-object mutated in the meanwhile, it wouldn't have no impact of next and before pointers. But the hash is toast now, I mean whether mutation changes hash code or not, which is also pretty easy to implement, either way make the value unreachable outside of the map sooner or later, but because the pointers inside the map still live, the value is hardly going to be garbage-collected, unless we make use of weak- or softHashmap.
@dmitrikonnov922
@dmitrikonnov922 2 жыл бұрын
in short-lived-objects it can by considerable, but in long-term state like caching or it can cause a huge pain in the ass. As for me. imho
@dmitrikonnov922
@dmitrikonnov922 2 жыл бұрын
Well, if we have to do with kinda object that we send to the client and later it's supposed to come back, well then our client will probably have done some mutations on it, won't it. That's why I'd rather call hashCode() on our object-to-send by myself, put this hashcode integer value as key into the map and store it into the specific field in our object-to-send. Once it's back again, I just get the stored value from the field and can keep using it as key. The hashCode() here works like an non-unique id.
@monsuruokuniyi1234
@monsuruokuniyi1234 2 жыл бұрын
This linkedhashmap seems pretty complicated. Nicely explained. Why use this rather than a hashmap. Thank you
@DailyCodeBuffer
@DailyCodeBuffer 2 жыл бұрын
To maintain insertion order
@dmitrikonnov922
@dmitrikonnov922 2 жыл бұрын
1) you might want to copy a map with guaranteed the same order as in the origin map 2) you might want to keep track of insertions for instance by implementing LRU-cache. For this particular case you'd use following constructor: public LinkedHashMap(int initialCapacity, float loadFactor, boolean accessOrder)
@DailyCodeBuffer
@DailyCodeBuffer 2 жыл бұрын
Thank you for detailed information
@dmitrikonnov922
@dmitrikonnov922 2 жыл бұрын
@@DailyCodeBuffer Was pleasure. I like your content. Honestly, mentioning implementation of lru-cache was kinda unrealistic of me. I think, Coffeine has ConcurrentLinkedHashMap, which almost covers all needs, unless we're dying to create something very special and customised.:D
@tabishquadri
@tabishquadri 2 жыл бұрын
ladka sahi samjhaya hai 👍👍
@DailyCodeBuffer
@DailyCodeBuffer 2 жыл бұрын
🙏🏻🙏🏻
@richajava4346
@richajava4346 7 ай бұрын
What is head and tail.
@nikhilvijay6022
@nikhilvijay6022 5 ай бұрын
head is the start of the LinkedList & tail is the end of LinkedList. Understanding Linkedlist would help in understanding hashmaps better
@shobhitgour1149
@shobhitgour1149 2 жыл бұрын
Yesterday in an Interview,this question was asked to me..i could not explain it..😞😞
@DailyCodeBuffer
@DailyCodeBuffer 2 жыл бұрын
Hope this video helps and you will rock next interview
@boorlamadhu2643
@boorlamadhu2643 2 жыл бұрын
Good more helpful 👍
@DailyCodeBuffer
@DailyCodeBuffer 2 жыл бұрын
Thank you 🙏🏻
@kavitapatil5285
@kavitapatil5285 2 жыл бұрын
first one 🙏🏻
@DailyCodeBuffer
@DailyCodeBuffer 2 жыл бұрын
Thanks Kavita 🙏🏻
ArrayDeque in Java | Internal Working
10:37
Daily Code Buffer
Рет қаралды 10 М.
Map and HashMap in Java with Internal Working- Interview Question
19:27
Daily Code Buffer
Рет қаралды 31 М.
I Sent a Subscriber to Disneyland
0:27
MrBeast
Рет қаралды 104 МЛН
$1 vs $500,000 Plane Ticket!
12:20
MrBeast
Рет қаралды 122 МЛН
JISOO - ‘꽃(FLOWER)’ M/V
3:05
BLACKPINK
Рет қаралды 137 МЛН
Learn SOLID Principles - Interview Questions
20:52
Daily Code Buffer
Рет қаралды 31 М.
Priority Queue Explained | Min and Max Heap | Custom Comparator
23:19
Daily Code Buffer
Рет қаралды 23 М.
HashTable vs HashMap vs Concurrent HashMap all kinds of Map implementations
41:26
Microservices using SpringBoot 3.0 | Full Example [NEW]
1:25:38
Daily Code Buffer
Рет қаралды 204 М.
Linked HashMap Internal Functionality | Lecture 8
17:12
PrinceAutomationDestination
Рет қаралды 339
Generics in Java - Full Tutorial
20:08
Daily Code Buffer
Рет қаралды 29 М.
01. Internal Working of HashMap & Java-8 Enhancement
19:11
Ankit Wasankar
Рет қаралды 124 М.
I Sent a Subscriber to Disneyland
0:27
MrBeast
Рет қаралды 104 МЛН