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.