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❤
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.
Hello Shrayansh,should we have be aware of the algorithm to find the hashcode or it will be internally calculate and who will provide that algorithm to find the hashcode?
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 ?
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.
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
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?
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
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'.
But when size of hashmap changed to 64 then rehashing will happen and indexes also will be modified according to new size and keys in each bucket will be redistributed according to new hashing and indexes
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??
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?
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.
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.
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.
I want to purchase your course but dont have visa and mastercard. I have other card which they are not accepting. Why dont you add UPI to the list? -A Student
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❤
thanks a lot buddy
What tech stack are you working on currently?
Java, Spring(Not boot), Weblogic, oracle database.(Legacy code like other service based companies)
u make the concept as butter like smooth , next level teaching skills u have
Thanks 🙏
Explained the same in Phonepe sde interview , cleared the round. Thanks bhai love u
all the best for further rounds buddy 👍
What was the question?
Ty Shrayansh Excellent explanation
Amazing explanation, learned this complex topic in a very easy way.
I always wondered that if we get only one map for all value, then how it's handled. Thanks for such wonderful explaination.🙌
"only one map for all value" what do u mean?
Great video Shrayansh 👌👍
Thanks
Excellent explanation of HashMap. Thanks Man.. Really helpful :)
A small correction when we use (null) as key by default, it stores at index 0 of the bucket.
Yes. Hash of null points to 0
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.
interviews one of the hot question
Yes it is
Hi Shrayansh please also explain the internal working of concurrenthashmap..
Hello Shrayansh,should we have be aware of the algorithm to find the hashcode or it will be internally calculate and who will provide that algorithm to find the hashcode?
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 ?
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.
Ack, will answer by eod.
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
Thank You so much. Eagerly waiting for this..
Hope you find this video helpful
Hi Shrayansh, Thank you for the way you explain. One question is that when I can expect videos on java concurrency.
After this collection topic
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?
Hi Shrayansh, just wanted to ask whether the HashMap is occupying contiguous memory when it is calculating hash for the particular size?
Hi Shrayansh,
Can you please add the full internal code implementation of the HashMap ? I was asked this in an interview..
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
Noted
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'.
Right
So shreyansh, how the value for that key will be updated, if we got different index for same key
But when size of hashmap changed to 64 then rehashing will happen and
indexes also will be modified according to new size and keys in each bucket will be redistributed according to new hashing and indexes
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??
Nice question, i think i should also cover this as an ad-hoc topic in java
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?
Rehashing of keys happens whenever HashMap size increases.
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.
hey shreyansh, can u explain the difference between putIfAbsent and put
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.
@@ConceptandCoding what about in null cases ??
@@Placement-bv9cg putifAbsent: if value is null it will update the value.
Do practice out with different scenarios buddy
I just want if you can share the document which you use for explaining that will be better at time of revision. Thank You
Pls check the description section buddy
from interview perspective , what all topics should I focus in collection s?
HapMap, internals is very imp.
And usage of collection like in which scenario what to use and how is also imp
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 ?
it will overwrite the value, because we can't store duplicate keys in hashmap
Hey
If we rehash/resize, then I think we cannot use %N to find an index, the problem we solve with consistent hashing, right?
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.
Why other videos of java are only for members ? Some days ago they were public ??
No Sarkar, Java from start is member only video.
@@ConceptandCoding nope I have watched some videos now they are member only
Anyways if I found them good I'll take membership
please every video for members why you public some video?
@@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.
Hi Shreyansh! Notes for this lecture is not uploaded?
Any update??
Java notes for lecture 23,24,25,26,27 is corrupted and does not show notes of 24,25,26,27. Sir, can you please re upload the notes?
thanks for the update, i will check today and update it
@ Thank you sir
I want to purchase your course but dont have visa and mastercard. I have other card which they are not accepting. Why dont you add UPI to the list?
-A Student
it’s all handled by TH-cam itself buddy
same can u teach for Custom ArrayList also if possible , would be really great
Sure will work on it
wow