🔥 Build Your Own HashMap in Python | Dive Deep into 706. Design HashMap

preview_player
Показать описание
Welcome back to the vanAmsen channel! Today, we're unveiling the magic behind one of the most essential data structures: the HashMap. Ever wondered how Python's dict works under the hood? Dive deep with me as we construct our very own version from scratch, handle collisions like pros, and optimize for performance. 🚀

If you find this video enlightening, don't forget to hit the like button, share with fellow code enthusiasts, and if you haven't already, subscribe for more deep dives into the world of programming. Your support drives this channel, and I can't wait to explore more coding adventures with you!
Рекомендации по теме
Комментарии
Автор

🚀 Hey amazing coders! Truly grateful for your continued support. This HashMap deep dive was a blast to make. Let me know in the comments: What data structure or algorithm should we tackle next? Keep coding, stay curious, and let's grow together! ❤

vanamsen
Автор

hi bro. which language u use for writing your solutions

aketostoboy
Автор

is it me or someone else also facing the sound problem. it's coming and then gone.

bhaskararya
Автор

So do we consider this as cheating ? This is what I had done. 🙂

var MyHashMap = function() {
keyMap = []
};

/**
* @param {number} key
* @param {number} value
* @return {void}
*/
MyHashMap.prototype.put = function(key, value) {
keyMap[key] = value
};

/**
* @param {number} key
* @return {number}
*/
MyHashMap.prototype.get = function(key) {
if(keyMap[key] == undefined)
return -1
return keyMap[key];
};

/**
* @param {number} key
* @return {void}
*/
MyHashMap.prototype.remove = function(key) {
if(keyMap[key] == undefined)
return

keyMap[key] = undefined;
};

isasunasra