Комментарии:
What is the point of having a balanced BST inside every bucket of a hash map? Why not just have one balanced BST and not use a hash map at all? In the worst case you're still having O(log(n)) time. Is it because in the best case you have O(1) time? That seems kind of weird.
ОтветитьHe's right about hanging in there. I knew a lot of people in college who basically didn't know anything about software development. I mean, they didn't know what a pointer was and all the classes were in c++. They didn't know what a dot did in C++ or Java in " value".trim(). I asked how they were going to get a job and they said if they apply 100 places, someone will take them. Sure enough, they were right.
ОтветитьThanks a lot for the motivation at the end - "Hang in there and stay patient". Made my day. ( wrt to my current job hunting situation)
ОтветитьOMG I've been asked the hashtable implementation question in one of my interview. If I've encountered this video earlier last week, I would have a better solution for that question :/
ОтветитьAnother excellent, fun, and engaging lesson. Thank you again. I laughed several times and to enjoy the learning is a bonus.
ОтветитьHi Gaurav - thanks for reviewing the hashmaps again in the context of quick memory retrieval; I've seen a lot of emphasis across places on coding a good hash function, but not making sure your keys are randomly uniformly-distributed!
Ответитьthe wallpaper at the back is upside down and i can’t unsee it
ОтветитьPlease enable CC button for auto-generated subtitle so that I can understand more.
ОтветитьHi gaurav,
In a interview i was asked a question-
Q1: A file have 1 billion records(key,value)pairs and we have 4gb RAM how do we store in a hashmap,
Q2 : A file have 1 billion records(key,value) pairs. if the user have to access a records with key somewhere in middle of file, how can we access it faster?
In a SQL database,s you can combined index of India, gender, city like so:
CREATE INDEX index_name
ON table_name(India, gender, city);
Then you have the index you will be looking for and your statemen is no longer true.
Sometimes it seems like I'm watching it in 1.25x😂 you're really fast
ОтветитьAmazing video.... nice background music..
ОтветитьWe can use BTree as well. That would be faster though. Indexing also internally uses that.
ОтветитьWow! Why can't we apply same concept on traditional SQL to collapse complexity from O(n) to O(log n) ?
ОтветитьThat's exactly what Java 8 has done with HashMap implementation which now converts the bucket into a Red Black Tree after reaching the threshold of 8 elements and converts it back to a linked list after reaching 6 elements with better performance.
ОтветитьYour videos are awesome as always! Hitting "like" specifically since I am a big fan of Pink Floyd! Great reference dude! I really admire the effort you put in for content creation and editing as well!
Ответить"its going to work out! Just hang in there and stay patient"
ОтветитьHey, I had kind of same interview question. I wanted to ask if B-Tree or any modification in B-Tree is a good choice?
Ответить