ConcurrentHashMap How It Works Internally. Asked by tech companies in phone screen interview rounds.

  Рет қаралды 25,137

Java Coding Insight Interview Preparation

Java Coding Insight Interview Preparation

Күн бұрын

Пікірлер: 21
@jacksonjohn2181
@jacksonjohn2181 Жыл бұрын
Very helpful.. thanks 🎉
@maksrane100
@maksrane100 Жыл бұрын
Glad it was helpful!
@gokulkadnar706
@gokulkadnar706 Жыл бұрын
Correction - Not arrayList its linkedList sir
@bilalhayat1
@bilalhayat1 Жыл бұрын
Gd explanation!
@pavlodiachuk987
@pavlodiachuk987 Жыл бұрын
In Concurrent HashMap it is not allowed to contain null key or value
@subasreesuriyakumar3442
@subasreesuriyakumar3442 2 жыл бұрын
Thanks a lot🙏🙏🙏
@maksrane100
@maksrane100 2 жыл бұрын
You're welcome 😊
@dhareppasasalatti7102
@dhareppasasalatti7102 3 жыл бұрын
Thank you so much for this.. Expecting more videos from your channel
@maksrane100
@maksrane100 3 жыл бұрын
Sure 😊 You may want to check playlists on this channel : Leetcode & Lintcode Solved Coding Problems Codeforces And many others are there....
@learnprogramming6930
@learnprogramming6930 2 жыл бұрын
Thank you
@maksrane100
@maksrane100 2 жыл бұрын
You're welcome.. Keep watching..
@sourabhjain3920
@sourabhjain3920 2 жыл бұрын
good explanation...
@maksrane100
@maksrane100 2 жыл бұрын
Glad you liked it
@shwetapriyadarshani197
@shwetapriyadarshani197 2 жыл бұрын
hi, i have one doubt, if i am modifying the node with key 101, can another thread read that particular node at the same time ? because read operations aren't blocked in Concurrenthashmap
@maksrane100
@maksrane100 2 жыл бұрын
In ConcurrentHashMap, at a time any number of threads can perform retrieval operation but for updated in the object, the thread must lock the particular segment in which the thread wants to operate. This is called as Segment locking. Hope this helps.
@shwetapriyadarshani197
@shwetapriyadarshani197 2 жыл бұрын
So what If one thread read the value just before updating that value and at the same time updation on that node happened. Say node at node 101, i am updating it's value to 501 and a thread comes to read its value, it reads 101 just before updating. So the thread will read stale value right? So how this is resolved
@mad005
@mad005 2 жыл бұрын
Yes it will read a stale value, since the read came before the write
@shravankumar-me5xi
@shravankumar-me5xi 2 жыл бұрын
What happens if we read the data from a segment when it is locked..??
@SHUBHAMVARDAAN
@SHUBHAMVARDAAN 6 ай бұрын
worst video, presenter is very confused about what he is presenting .
@AjithYadavT
@AjithYadavT Жыл бұрын
Concurrenthashmap is slow compare with hashmap
@maksrane100
@maksrane100 Жыл бұрын
ConcurrentHashMap performance is low sometimes because sometimes threads may be required to wait on ConcurrentHashMap. In case of HashMap performance is comparitively high because it is non-synchronized in nature and any number of threads can perform simultaneously.
СИНИЙ ИНЕЙ УЖЕ ВЫШЕЛ!❄️
01:01
DO$HIK
Рет қаралды 3,3 МЛН
How Strong Is Tape?
00:24
Stokes Twins
Рет қаралды 96 МЛН
I gave 127 interviews. Top 5 Algorithms they asked me.
8:36
Sahil & Sarra
Рет қаралды 691 М.
ConcurrentHashmap in Java and its differences with Synchronized HashMap
11:34
This is the Only Right Way to Write React clean-code - SOLID
18:23
Dependency Injection, The Best Pattern
13:16
CodeAesthetic
Рет қаралды 916 М.
7 Database Design Mistakes to Avoid (With Solutions)
11:29
Database Star
Рет қаралды 99 М.
Set and HashSet in Java - Full Tutorial
20:43
Coding with John
Рет қаралды 246 М.
СИНИЙ ИНЕЙ УЖЕ ВЫШЕЛ!❄️
01:01
DO$HIK
Рет қаралды 3,3 МЛН