August 2017
Intermediate to advanced
222 pages
5h 3m
English
On nights and weekends, you’re single-handedly working on a stealth startup that will take over the world. It’s…a thesaurus app. But this isn’t any old thesaurus app—this is Quickasaurus. And you know that it will totally disrupt the billion-dollar thesaurus market. When a user looks up a word in Quickasaurus, it returns the word’s most popular synonym, instead of every possible synonym as old-fashioned thesaurus apps do.
Since every word has an associated synonym, this is a great use case for a hash table. After all, a hash table is a list of paired items. So let’s get started.
We can represent our thesaurus using a hash table:
| | thesaurus = {} |
Under the hood, a hash table stores its ...