⚙️AlgorithmIntermediate
String Hashing (Polynomial Hash)
Polynomial string hashing encodes a string as a base-p number modulo a large prime, letting us compare substrings in O(1) after O(n) preprocessing.
#string hashing#polynomial hash#rolling hash+12