3 ms·
Abdul Bari is pretty good. He tried to explain from the root instead of jumping into a topic directly. However I hope he adds more videos for implementation as
by markus_zhang 5y ago
Abdul Bari is pretty good. He tried to explain from the root instead of jumping into a topic directly. However I hope he adds more videos for implementation as that's more difficult than the algo itself.
- certeoun 5y agoIf you are proficient in C, maybe his videos might help you: https://www.youtube.com/user/mycodeschool/videos https://www.youtube.com/user/mycodeschool/videos General tips: If you are implementing a hash table (std::unordered_map) via open addressing: you cannot simply delete "buckets" or entries out of a hash table. Why? Because you "break" the search chain. The solution is to have a flag or something for each bucket. FULL|"I stored this here"|EMPTY|nullptr|DEAD|"I am invalid now :("|... You have 3 states. When searching or deleting, you preserve the "search chain" that way. "FULL" and "DEAD" means you can iterate over or delete when on a search or delete op. "EMPTY" on an add operation means, okay here it is, here I can place something. If you use chaining instead of open addressing you don't have to worry about "breaking the search chain".