Implementing Resize of a Hash Table

preview_player
Показать описание

Build Your Own Redis / DNS / BitTorrent / SQLite - with CodeCrafters.

In the ninth video of the hash table internal series, we delved into the crucial concept of resizing a hash table for consistent performance. With chain hashing, we discussed monitoring the load factor to trigger a resize and the importance of shrinking the table to avoid wasted memory. In open addressing, we explored the complexities of soft deletes and the need for two counters to handle active and occupied slots efficiently. These considerations are vital for implementing a successful resize operation in hash tables, ensuring optimal performance.

# Recommended videos and playlists

If you liked this video, you will find the following videos and playlists helpful

# Things you will find amusing

# Other socials

I keep writing and sharing my practical experience and learnings every day, so if you resonate then follow along. I keep it no fluff.

Thank you for watching and supporting! it means a ton.

I am on a mission to bring out the best engineering stories from around the world and make you all fall in
love with engineering. If you resonate with this then follow along, I always keep it no-fluff.
Рекомендации по теме
Комментарии
Автор

Hi Arpit, Thanks for this great video!!!
A quick clarification, while shrinking the Hash Table in case of an Open Addressing we use the count of the used keys instead of active keys to shrink down, but since I am never reducing the used counter as it is always a soft delete, this means that my load factor never decreases and will always increase or remains the same and I will never be able to shrink down. Please correct me if I am missing something here.

AdityaKumar-rksu