News for hackers. Stuff that matters.
Re:Tell HN: Some of my favorite CS content creators by markus_zhang on Wednesday August 18, 2021 @10:33AM (#28221473)
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.
Re:Tell HN: Some of my favorite CS content creators by certeoun on Wednesday August 18, 2021 @12:24PM (#28223509)
If you are proficient in C, maybe his videos might help you:

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".