dsa1 min read
Count Distinct Substrings — Suffix Array + LCP
Count the number of distinct substrings using the suffix array and LCP array. Total substrings minus sum of LCP values gives distinct count in O(n log n).
Read →
webcoderspeed.com
1 articles
Count the number of distinct substrings using the suffix array and LCP array. Total substrings minus sum of LCP values gives distinct count in O(n log n).