Rolling hash

From Wikipedia, the free encyclopedia

A rolling hash is a hash function where the input is hashed in a fixed width window that moves through the input. It enables the next hash value to be computed from the previous in constant time. One of the main applications is the Rabin-Karp string search algorithm.