Module String matching - Hash

String matching - Hash

**Frequency: 5/10** Used in string problems. You should focus on hash algorithm first.

Resources

- [CP Algorithms: String hashing](https://cp-algorithms.com/string/string-hashing.html) More on string matching: - [CP Algorithms: Prefix function. Knuth–Morris–Pratt algorithm](https://cp-algorithms.com/string/prefix-function.html)

Problems

String occurences 2 321 / 329 1000
Repeated string 180 / 225 1100
Compare substring 135 / 176 1200
Palindrome substring 2 115 / 149 1200
String combinations 79 / 90 1200
Frequent substring 103 / 118 1200
Good pairs 65 / 74 1300
String rotation 85 / 103 1300
Bit reversing 31 / 38 1400
Repeated string 2 22 / 44 1900