1HASH TABLES
In this chapter, we’ll solve two problems whose solutions hinge on being able to perform efficient searches. The first problem is determining whether or not all snowflakes in a collection are identical. The second is determining which words are compound words. We want to solve these problems correctly, but we’ll see that some correct approaches are simply too slow. We’ll be able to achieve enormous performance increases using a data structure known as a hash table, which we’ll explore at length.
We’ll end the chapter by looking at a third problem: determining how many ways a letter can be deleted from one word to arrive at another. ...
Get Algorithmic Thinking now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.