
Hash Tables - Beau teaches JavaScript
video description
Date: 2022-03-14
Related videos
Comments and reviews: 6
Vishal
Can you explain what do you mean by -When (inserted=== false), then push the key,vales into storage array. But how do we get multiple entries for the same bucket? It means collision right? But how can it happen when you don't find the same key which actually happens in previous case i.e. when the key exists already. Help me.
reply
Can you explain what do you mean by -When (inserted=== false), then push the key,vales into storage array. But how do we get multiple entries for the same bucket? It means collision right? But how can it happen when you don't find the same key which actually happens in previous case i.e. when the key exists already. Help me.
reply
shayan
Really weird mixture of var let and const here. Your storage can be a const since the array location in the memory doesn't change, only the array items do. all the functions should also be consts as well. there's really no point in using var anymore. great video otherwise!
reply
Really weird mixture of var let and const here. Your storage can be a const since the array location in the memory doesn't change, only the array items do. all the functions should also be consts as well. there's really no point in using var anymore. great video otherwise!
reply
John
I think I might be missing something here, wasn't the point of a hastable to have O(1) reads, inserts, and deletes? This is running O(n) blocks for each of those operations. Is there a way to get those down to O(1) in Javascript?
reply
I think I might be missing something here, wasn't the point of a hastable to have O(1) reads, inserts, and deletes? This is running O(n) blocks for each of those operations. Is there a way to get those down to O(1) in Javascript?
reply
Good
Nice explanation. Good work, Beau Carnes !
Line 42,
There is a use case in Remove method, that is the key doesn't exist in array.
The code logic works. If we may test it separately, it'll be more clear.
reply
Nice explanation. Good work, Beau Carnes !
Line 42,
There is a use case in Remove method, that is the key doesn't exist in array.
The code logic works. If we may test it separately, it'll be more clear.
reply
Sifat
Hey, great content! But I think using splice instead of delete will be a better solution. This throws an error if you remove a chained key and then try to reassign it.
reply
Hey, great content! But I think using splice instead of delete will be a better solution. This throws an error if you remove a chained key and then try to reassign it.
reply
Sergey
at line 43 you have deleted array item, but length of array wasn't changed. So line 42 never will be true if we have inserted item once
reply
at line 43 you have deleted array item, but length of array wasn't changed. So line 42 never will be true if we have inserted item once
reply
Add a review, comment
Other channel videos















