Тёмный

25. Collections in Java - Part4 | HashMap Internal Working in Java 

Concept && Coding - by Shrayansh
Подписаться 129 тыс.
Просмотров 19 тыс.
50% 1

Опубликовано:

 

3 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 66   
@code4logics
@code4logics Год назад
u make the concept as butter like smooth , next level teaching skills u have
@ConceptandCoding
@ConceptandCoding Год назад
Thanks 🙏
@deepsinghrajput2211
@deepsinghrajput2211 2 месяца назад
Ty Shrayansh Excellent explanation
@bhuvanakuppusamy6933
@bhuvanakuppusamy6933 3 месяца назад
Excellent explanation of HashMap. Thanks Man.. Really helpful :)
@tanujarora4906
@tanujarora4906 8 месяцев назад
Hi , 1.5 year experienced engineer working in Service Based, I went for an interview for a Hyderabad based startup he told me dude you have knowledge of a 5 year experienced guy. Just follow this playlist you are good to go for any company Fodd doge koi bhi java interview. Tcs, infosys toh mazaak lagengey iske baad😂 Thanks bhai❤
@ConceptandCoding
@ConceptandCoding 8 месяцев назад
thanks a lot buddy
@faizanqazi7004
@faizanqazi7004 8 месяцев назад
What tech stack are you working on currently?
@tanujarora4906
@tanujarora4906 8 месяцев назад
Java, Spring(Not boot), Weblogic, oracle database.(Legacy code like other service based companies)
@sushantbasak1647
@sushantbasak1647 7 месяцев назад
Amazing explanation, learned this complex topic in a very easy way.
@ThrottleJourneys
@ThrottleJourneys 6 месяцев назад
Explained the same in Phonepe sde interview , cleared the round. Thanks bhai love u
@ConceptandCoding
@ConceptandCoding 6 месяцев назад
all the best for further rounds buddy 👍
@SrishtiJaiswal-v5m
@SrishtiJaiswal-v5m 20 дней назад
What was the question?
@shivansamala7862
@shivansamala7862 5 месяцев назад
A small correction when we use (null) as key by default, it stores at index 0 of the bucket.
@girishanker3796
@girishanker3796 2 месяца назад
Yes. Hash of null points to 0
@ashishjaiswal4207
@ashishjaiswal4207 Год назад
I always wondered that if we get only one map for all value, then how it's handled. Thanks for such wonderful explaination.🙌
@thevagabond85yt
@thevagabond85yt 10 месяцев назад
"only one map for all value" what do u mean?
@zaheerabass7955
@zaheerabass7955 Год назад
second time i watched the full video. It gives much confidence now. Thank You so much. And I request you to please make a video on multithreading and java 8 features.
@ManjeetKaur-y1y
@ManjeetKaur-y1y 8 месяцев назад
Hi Shrayansh please also explain the internal working of concurrenthashmap..
@zaheerabass7955
@zaheerabass7955 Год назад
Thank You so much. Eagerly waiting for this..
@ConceptandCoding
@ConceptandCoding Год назад
Hope you find this video helpful
@ManishVerma-si8nv
@ManishVerma-si8nv Год назад
Great video Shrayansh 👌👍
@ConceptandCoding
@ConceptandCoding Год назад
Thanks
@code4logics
@code4logics Год назад
interviews one of the hot question
@ConceptandCoding
@ConceptandCoding Год назад
Yes it is
@name1566
@name1566 10 месяцев назад
the explanation you do is awesome. I have some doubts 48:19 when you stored key 2 and value B , it should stored in the array first na ? you have written outside the index 3 block. another doubt , is there any order for load factor and treefy thresholding ? I think that as per the scenario either of these 2 could come to the action , am I right ?
@AbhrajitChowdhury-nm8im
@AbhrajitChowdhury-nm8im 4 месяца назад
Hi Shrayansh, Can you please add the full internal code implementation of the HashMap ? I was asked this in an interview..
@KishanKumar-ny3zk
@KishanKumar-ny3zk Год назад
Hi Shrayansh, Thank you for the way you explain. One question is that when I can expect videos on java concurrency.
@ConceptandCoding
@ConceptandCoding Год назад
After this collection topic
@sayeedanawar
@sayeedanawar 9 месяцев назад
Hello Shryansh, really good details in a simpler way . I have one doubt. If in key we store any Object then we need to override that particular class's hashCode() method. But what will happen in case of coelution ? Then how we will compare while getting value? How we will compare hashValue of key and key object?
@krishnendughosh2368
@krishnendughosh2368 10 месяцев назад
I have 2 doubts. 1) 37:52 does it count the horizontal values also before doing re-hash for 13 nodes (16*0.75 + 1)? Suppose I have 13 nodes.. and 7 of them are forming a linkedList. Will it count it as a scenario when it have to do re-hash or does it wait till the moment 13 nodes gets filled vertically? 2) If both load factor and treefyThreashold gets crossed at same time which one will heppen first? At 26:59 here as per example the key 5 is producing two different hash values. I think that is a mistake.
@ConceptandCoding
@ConceptandCoding 10 месяцев назад
Ack, will answer by eod.
@kanaparthiphani481
@kanaparthiphani481 9 месяцев назад
Hi,I am also having the same questions. can you please address these. And also while calculating the index after getting hash value and dividing the hash value by size, in this are we also considering the LinkedList that were created on collision or are we only considering initial size of array of nodes
@prashantgupta6160
@prashantgupta6160 10 месяцев назад
Hey shreyansh, excellent video. I have one request though, can you make a video on spring boot learning path and resources from which one can learn. I am coming from python django background and recently giving the interviews and most of the time, the requirementb is of java and spring boot. I know you will create a series on spring boot going forward but if you just make one video for now which covers the introduction and resources and what are important interview question then it will be immensely helpful
@ConceptandCoding
@ConceptandCoding 10 месяцев назад
Noted
@shubhamrajput37
@shubhamrajput37 8 месяцев назад
Hi Shrayansh, just wanted to ask whether the HashMap is occupying contiguous memory when it is calculating hash for the particular size?
@akshitasrivastava3064
@akshitasrivastava3064 2 месяца назад
Hi Shreyansh! Notes for this lecture is not uploaded?
@akshitasrivastava3064
@akshitasrivastava3064 2 месяца назад
Any update??
@sarkar_957
@sarkar_957 10 месяцев назад
Why other videos of java are only for members ? Some days ago they were public ??
@ConceptandCoding
@ConceptandCoding 10 месяцев назад
No Sarkar, Java from start is member only video.
@sarkar_957
@sarkar_957 10 месяцев назад
@@ConceptandCoding nope I have watched some videos now they are member only
@sarkar_957
@sarkar_957 10 месяцев назад
Anyways if I found them good I'll take membership
@dayashankarlakhotia4943
@dayashankarlakhotia4943 10 месяцев назад
please every video for members why you public some video?
@ConceptandCoding
@ConceptandCoding 10 месяцев назад
@@dayashankarlakhotia4943 hi, i got requests to open some videos, so that engineers can see if they find it useful or not. That's the reason.
@Placement-bv9cg
@Placement-bv9cg Год назад
hey shreyansh, can u explain the difference between putIfAbsent and put
@ConceptandCoding
@ConceptandCoding Год назад
putifAbsent -> if key already exists return the value already associated, else create a new mapping with this key and value. put -> if map already has the same key present it will overwrite the value now provided and do not have the key present: it will add new key-value mapping.
@Placement-bv9cg
@Placement-bv9cg Год назад
@@ConceptandCoding what about in null cases ??
@ConceptandCoding
@ConceptandCoding Год назад
@@Placement-bv9cg putifAbsent: if value is null it will update the value. Do practice out with different scenarios buddy
@yashsawant5953
@yashsawant5953 9 месяцев назад
Hey shreyansh, I had a doubt suppose initially when the length of array is 16 I put key as 'A' hash will generate for 'A' and it will mod with 16 we will get the index for it correct. Suppose after some insertion the array size increased to 64 and we again tries to put key 'A' for updating the value, now for 'A' same hash will be generated but this time we are going to mod with different size that is 64 so we will get the different index for 'A'.
@ConceptandCoding
@ConceptandCoding 9 месяцев назад
Right
@yashsawant5953
@yashsawant5953 9 месяцев назад
So shreyansh, how the value for that key will be updated, if we got different index for same key
@ashishchoksi8501
@ashishchoksi8501 Год назад
Hi shreyansh, Thanks for amazing video! I have a doubt on Java Date class. sometimes we code across the code that uses different flavours of Dates. someone uses Date, DateTime, ZonedTime - as per their comfort also hell lot of utilities that provides date and DateFormatter() its all rabbit hole now. Assuming a new guy in java what are the best practices to use proper class of Date?? Is there any standard like given 100s of Date classes always use these 2 or 5 class??
@ConceptandCoding
@ConceptandCoding Год назад
Nice question, i think i should also cover this as an ad-hoc topic in java
@Sanjeev.Network
@Sanjeev.Network Год назад
I just want if you can share the document which you use for explaining that will be better at time of revision. Thank You
@ConceptandCoding
@ConceptandCoding Год назад
Pls check the description section buddy
@sajaljain6653
@sajaljain6653 10 месяцев назад
Hey Shreyansh, just one doubt suppose rehashing is happening then its size will be increase and old entry has some hasing value and based on these hasing value index were generated using logic(hashvalue%sizeofArray) now after rehasing and we have called put method and so again it will generate the hasValue which will be same as old one but this time while generating index it will different because this time index = hashValue % size of array and this time of size of array will be different how it work for keys whose were stored before rehashing?
@ConceptandCoding
@ConceptandCoding 10 месяцев назад
Rehashing of keys happens whenever HashMap size increases.
@abhiie18
@abhiie18 4 месяца назад
when resizing is occur, the new array is created the all the values from old are shifted based on the newly created index in new array. after that when some put method will be called its stored in newly created array.
@ayushraj-zb6sv
@ayushraj-zb6sv 11 месяцев назад
from interview perspective , what all topics should I focus in collection s?
@ConceptandCoding
@ConceptandCoding 11 месяцев назад
HapMap, internals is very imp. And usage of collection like in which scenario what to use and how is also imp
@vishalgarg8541
@vishalgarg8541 Год назад
Hey Shryansh, Can you please let me know if we can store like 2 different Student Objects with same values as a key. Then what's happened ?
@ashishrai8870
@ashishrai8870 3 месяца назад
it will overwrite the value, because we can't store duplicate keys in hashmap
@code4logics
@code4logics Год назад
same can u teach for Custom ArrayList also if possible , would be really great
@ConceptandCoding
@ConceptandCoding Год назад
Sure will work on it
@niwanshumaheshwari4534
@niwanshumaheshwari4534 10 месяцев назад
Hey If we rehash/resize, then I think we cannot use %N to find an index, the problem we solve with consistent hashing, right?
@abhiie18
@abhiie18 4 месяца назад
when resizing is occur, the new array is created the all the values from old are shifted based on the newly created index in new array. after that when some put method will be called its stored in newly created array.
@--SaikrishnaR
@--SaikrishnaR 8 месяцев назад
wow
Далее
Collection Framework Basics in One Video | Hindi
1:38:04
Просмотров 322 тыс.
Living life on the edge 😳 #wrc
00:17
Просмотров 4,8 млн
01. Internal Working of HashMap & Java-8 Enhancement
19:11
Introduction to HashMap & HashTable in Java
1:39:46
Просмотров 104 тыс.