Man! I have been watching all these playlists lately, I have an amazon interview scheduled soon. And this is the best online content available. Thank You so much for contributing such great explanations and concepts.
I am glad you liked it. I also hope that you are watching till end and trying to understand the what, how and especially why of the problem. If you like our efforts, we request a review g.page/Pepcoding/review?rc You can subscribe to our channel here th-cam.com/users/Pepcodingabout?view_as=subscriber
If you like the content could you post something on LinkedIn about us? This will help us in reaching out to more people and help a lot of other students as well Something like this Sumeet Malik from Pepcoding is making all his content freely available to the community You can check it out here - www.pepcoding.com/resources / Also, this is the youtube channel - th-cam.com/users/Pepcodingplaylists?view_as=subscriber
Thank you so much sir for such a deep analysis of implementation of Hashmap. It took some time to completely understand, analyze and then implement the complete Hashmap but now it feels like an achievement ❤
I am glad. Your kind words are the kind of motivation that truly help me in making more and more content. Especially, these days, not everybody is generous with motivating anybody either. It means a lot. If you like our efforts, will you like to write a few words about us here (www.quora.com/How-do-I-start-learning-or-strengthen-my-knowledge-of-data-structures-and-algorithms )
@@Pepcoding Thankyou so much Sir ❤ Yes Sir, surely I will write what all I have experienced and how confidently I can recommend Pepcoding to everyone. Although I am still not qualified enough to give an answer.
thank you so much sir...wonderfully explained the concept. i have a request to you.. please make a playlist in which all the data structures will be implemented like hashmap...
Glad it was helpful! and If you like our efforts, please upvote the comments written by the students about Pepcoding here (www.quora.com/What-are-the-good-websites-to-learn-data-structures-and-algorithms )
what if hash code returns -2^31 viz INT_MIN value in java if we perform Math.abs on that we will get 2^31 but INT_MAX in java is 2^31-1 due to which we will get integer overflow in this am i right????
Beta, I regret to inform you that, I won't be able to answer/solve the personal doubts of each and every student over here. For clearing your doubts, you can join our community on telegram - t.me/pepcoding.
Sir load factor ki value generally hm kya rakh sakte hain??? default toh 0.75 hoti na??? nd array ki size default agar 16 hui it seems that ki 2^ power me hi increse hogi it means next hui to 2^5 i.e 32 hogi na????
Glad to know that you liked the content and thank you for appreciating. If you like our efforts, will you like to write a few words about us here (www.quora.com/How-do-I-start-learning-or-strengthen-my-knowledge-of-data-structures-and-algorithms )
Java keeps a lambda of 0.5 (I don't know the reason why) I think lambda is a constant. As long as we keep a constant as lambda, we are going to get a theoretical average case complexity of a constant.
Thankyou beta! I am glad you liked it. I hope that you are watching till the end and trying to understand what, how, and especially why of the problem. If you like our efforts, will you like to write a few words about us here (www.quora.com/What-are-the-good-websites-to-learn-data-structures-and-algorithms )
sir..plss complete dynamic programming playlist first..as placements have started nd i fear dp the most...ur videos are helping me..plss complete it first..
Thankyou beta! I am glad you liked it. Will you like to write a few words about us here (www.quora.com/What-are-the-good-websites-to-learn-data-structures-and-algorithms)
Great explanation sir!!Do these type of questions in which construction of data structures is involved come in interview or they are for explanation purpose?
Hahaha, thankyou beta. I am glad you liked it. I also hope that you are watching till end and trying to understand the what, how and especially why of the problem. If you like our efforts, we request a review - g.page/Pepcoding/review?rc
sir apne implementation of hashmap jaldi jaldi mei nipta diya, acchi feel nahi aayi ismei, apko iski 10 vedio ki playlist banani chahiye thi, usmei phle hashing algorithm ka thoda sa part, fir hash code kaise kaam karta hai, load factor kaise optimize kar deta data structure ko, ismei hum basiclly array ki searching property jo ki O(1) mei hoti hai uske basis par isko built kar rahen hain, yeh sab achhi feel de deta topic ki, bhagwaan kasam maza hee aa jata.
Man! I have been watching all these playlists lately, I have an amazon interview scheduled soon. And this is the best online content available. Thank You so much for contributing such great explanations and concepts.
Glad it was helpful!
i guess Im quite randomly asking but do anybody know of a good website to stream new series online ?
@Wayne Vihaan thanks, signed up and it seems like they got a lot of movies there :D I really appreciate it!!
@Jamari Arian no problem :)
How was your interview and what are you doing right now?
One of the most under rated channel on youtube
With the love and respect and support from you people one day we will reach heights and touch the sky.
ek number bhai , y bilkul ek line m bta dta hai jha time waste ni krna chaiye
Before watching this video, I was like hashmap is too much scary, but after watching this I'm confident enough.Thank you so much sir🙏
I am glad you liked it. I also hope that you are watching till end and trying to understand the what, how and especially why of the problem.
If you like our efforts, we request a review
g.page/Pepcoding/review?rc
You can subscribe to our channel here
th-cam.com/users/Pepcodingabout?view_as=subscriber
This is the best explanation I have seen in all the videos so far on HASHMAP Implementations.
Thank you so much !
If you like the content could you post something on LinkedIn about us? This will help us in reaching out to more people and help a lot of other students as well
Something like this
Sumeet Malik from Pepcoding is making all his content freely available to the community
You can check it out here - www.pepcoding.com/resources
/
Also, this is the youtube channel - th-cam.com/users/Pepcodingplaylists?view_as=subscriber
Huge respect for Sumit sir for such a great explanation 🙏🙏🙏🙏🙏🙏.
Thank you so much sir for such a deep analysis of implementation of Hashmap. It took some time to completely understand, analyze and then implement the complete Hashmap but now it feels like an achievement ❤
I am glad. Your kind words are the kind of motivation that truly help me in making more and more content. Especially, these days, not everybody is generous with motivating anybody either. It means a lot.
If you like our efforts, will you like to write a few words about us here (www.quora.com/How-do-I-start-learning-or-strengthen-my-knowledge-of-data-structures-and-algorithms )
@@Pepcoding Thankyou so much Sir ❤
Yes Sir, surely I will write what all I have experienced and how confidently I can recommend Pepcoding to everyone. Although I am still not qualified enough to give an answer.
LIKE TRUST ME SUMEET SIR , NO ONE TEACHES DSA LIKE YOU . AMAZING ..
Crystal Clear Explanation.
This is the best explanation that I've ever seen on HashMap implementation. You made it so easy, Sir
This question was asked to me in the Cognizant (GenC next ) technical round.
thank you so much sir...wonderfully explained the concept.
i have a request to you.. please make a playlist in which all the data structures will be implemented like hashmap...
exactly what I was looking for
Thanks sir, these lectures are amazing!!!!!
Thanks Sumit sir, It was really helpful
Bhari swaal.😷😷
Good Going sir...Plese complete next in row sir....
I'm very thank full for you ,for this effort sir..
I will try my best
Great explanation🤯👌
Glad it was helpful! and If you like our efforts, please upvote the comments written by the students about Pepcoding here (www.quora.com/What-are-the-good-websites-to-learn-data-structures-and-algorithms )
please explain hashcode function internally
Very nice explanation, only one suggestion keySet() method should return set instead of list
what if hash code returns -2^31 viz INT_MIN value in java if we perform Math.abs on that we will get 2^31 but INT_MAX in java is 2^31-1 due to which we will get integer overflow in this am i right????
Beta, I regret to inform you that, I won't be able to answer/solve the personal doubts of each and every student over here. For clearing your doubts, you can join our community on telegram - t.me/pepcoding.
@@Pepcoding yes sir joined👍
Sir load factor ki value generally hm kya rakh sakte hain??? default toh 0.75 hoti na??? nd array ki size default agar 16 hui it seems that ki 2^ power me hi increse hogi it means next hui to 2^5 i.e 32 hogi na????
Great teaching Style, Thanks Sir!
Glad to know that you liked the content and thank you for appreciating. If you like our efforts, will you like to write a few words about us here (www.quora.com/How-do-I-start-learning-or-strengthen-my-knowledge-of-data-structures-and-algorithms )
Sir Priority queue/ heap pr bhi ek video aa jati to maza aa jata
I know nados down hai, it would be great if u release ur test cases
Great explaination sir
Sir how do we decide that what should be the best value for lambda?
Java keeps a lambda of 0.5 (I don't know the reason why)
I think lambda is a constant. As long as we keep a constant as lambda, we are going to get a theoretical average case complexity of a constant.
bhagwAN ksm pura dimag hill gya but smj aa gya saara✨
wow, such a great explanation I could ever get on the topic
Thankyou beta!
I am glad you liked it. I hope that you are watching till the end and trying to understand what, how, and especially why of the problem.
If you like our efforts, will you like to write a few words about us here (www.quora.com/What-are-the-good-websites-to-learn-data-structures-and-algorithms )
Incredible
Summet sir best
Great explanation sir.
sir..plss complete dynamic programming playlist first..as placements have started nd i fear dp the most...ur videos are helping me..plss complete it first..
hanji wahi karenge abhi.
Sir bucket Ka size or lambda ki value kuch bhi le skte hain na?
ji. Java lambda ko 0.5 rakhti hai aur initial bucket array 16 length ka. Uske peeche ka reason mujhe maloom nahi.
@@Pepcoding ok sir
sir rehash func me size zero kyu kara h. Agar hm insert krte h or rehash ho jaata h to size bn jaayega. Fir size func size 0 return krega jo ki glt h
Sir rehashing krne se toh performance degrade hoti hai na??
Amazing sir
Thankyou beta!
I am glad you liked it.
Will you like to write a few words about us here (www.quora.com/What-are-the-good-websites-to-learn-data-structures-and-algorithms)
mast hai re baba
Great explanation sir!!Do these type of questions in which construction of data structures is involved come in interview or they are for explanation purpose?
For both interview and explanation.
Ok ty sir
Sir, can you also share the design rules of the hashmap, like should not be address based?
Will make a video on that as well beta
bhaiyya wo intro video mein aapne bola tha ki class mein to cpp mein sare revise karwadenge yt mein bh i aap karwaenge?
Hanji. Yahan bhi Oct-Nov-Dec mei sara C++ mei dalega.
Thank you sir!!
Arey, you are checking the videos! Most welcome.
Didi made my life to connect with sumeet sir thanku di
@@anjneykumarsingh4461thank you, all the best ♥️ 😊😊
@@Pepcoding yes sir, was looking for hashmap implemention everywhere, just when this video popped up! 😊
@@apoorvamittal4112 Hello Mam, are you that same girl in who is placed Atllasian?
Sir size kyo zero kiya yeh toh aap batana hi bhul gye, 37:49
put function increases size as new nodes get added
BEST
Superb!!!!!!!!! Thank you so much..Where can we find the source code sir?
Bhut hard
Sir your videos are like the vaccine to the corona(Data Structure)
Hahaha, thankyou beta.
I am glad you liked it. I also hope that you are watching till end and trying to understand the what, how and especially why of the problem.
If you like our efforts, we request a review - g.page/Pepcoding/review?rc
kadak....
neat!
Thankyou!
code share kardo sir ye wala
beta yahan hashmap wale lecture mei hai code.
www.pepcoding.com/resources/online-java-foundation
//thank you sir, here is my c++ implementation, please inform me if found errors i haven't tested it hard.
template
class HashMmap {
private:
class HMNode {
public:
K key;
V value;
HMNode(K k, V v) {
key = k;
value = v;
}
};
int sizeHM;
list *buckets;
void initBuckets(int bucketSize) {
buckets = new list[bucketSize];
}
int hashfn(K key) {
hash hashFunction;
size_t hc = hashFunction(key);
return hc % bucketCount;
}
int getIndWithInBucket(K key, int bi) {
int di = 0;
for(HMNode node : buckets[bi]) {
if(node.key == key) {
return di;
}
di++;
}
return -1;
}
void rehash() {
int oldBucketCount = bucketCount;
list *oldBuckets = buckets;
bucketCount = oldBucketCount*2;
initBuckets(bucketCount);
sizeHM = 0;
for(int i = 0; i < oldBucketCount; i++) {
for(auto node : oldBuckets[i]) {
insert(node.key, node.value);
}
}
delete[] oldBuckets;
}
public:
int bucketCount;
HashMmap() {
bucketCount = 4;
initBuckets(bucketCount);
sizeHM = 0;
}
void insert(K key, V value) {
int bi = hashfn(key);
int di = getIndWithInBucket(key, bi);
if(di != -1) {
auto it = buckets[bi].begin();
advance(it, di);
HMNode &node = *it;
node.value = value;
} else {
HMNode node(key, value);
buckets[bi].push_back(node);
sizeHM++;
}
double lambda = sizeHM * 1.0 / bucketCount;
if(lambda > 2.0) {
rehash();
}
}
V at(K key) {
int bi = hashfn(key);
int di = getIndWithInBucket(key, bi);
if(di != -1) {
auto it = buckets[bi].begin();
advance(it, di);
HMNode &node = *it;
return node.value;
} else {
cout
sir apne implementation of hashmap jaldi jaldi mei nipta diya, acchi feel nahi aayi ismei, apko iski 10 vedio ki playlist banani chahiye thi, usmei phle hashing algorithm ka thoda sa part, fir hash code kaise kaam karta hai, load factor kaise optimize kar deta data structure ko, ismei hum basiclly array ki searching property jo ki O(1) mei hoti hai uske basis par isko built kar rahen hain, yeh sab achhi feel de deta topic ki, bhagwaan kasam maza hee aa jata.
Please speak English
Hi Andrew, the same content in Also available in English in c++, java or python. On nados web site for free. If you need help let me know