How dictionaries really work
Preface
This rather long post is my attempt to explain to novice programmers how hash tables work. Let's start with a definition from our advanced writers a hash table is a data structure for storing key-value pairs and is part of the standard library of many languages. Depending on your language of choice, you might know hash tables as hashes, HashMaps, dictionaries, dicts, associative arrays, or symbol tables.
If you're already familiar with hash tables, you'll probably spot many points in this post where I have either simplified things, or avoided talking about them entirely. If you think that any of these simplifications hinder rather than help ...
more ...