dsa2 min read
String Hashing — Polynomial Hash for O(1) Substring Comparison
Precompute polynomial prefix hashes to compare any two substrings in O(1). Enables O(n log n) LCP computation and O(n) duplicate detection.
Read →
webcoderspeed.com
1 articles
Precompute polynomial prefix hashes to compare any two substrings in O(1). Enables O(n log n) LCP computation and O(n) duplicate detection.