Книга: A Common-Sense Guide to Data Structures and Algorithms in Python, Volume 2 (for True Epub)
Назад: Exercises
Дальше: Substring Search

Chapter 11
Keeping Your Text Search Sharp with a Little Rabin-Karp

In the previous chapter, you gained deeper insight into hash functions and even built your own basic hash table using division hashing. However, hash functions can be used even outside the context of hash functions to solve all sorts of different problems, sometimes in surprising ways.

In this chapter, you’ll discover one innovative way in which hash functions, when wrapped in a Monte Carlo algorithm, can be used to solve a common and fundamental problem known as substring search.

Назад: Exercises
Дальше: Substring Search