Concepts5
⚙️AlgorithmAdvanced
Suffix Array Construction
A suffix array stores the starting indices of all suffixes of a string in lexicographic order, enabling fast substring queries and many string operations.
#suffix array#lcp array#kasai+12
⚙️AlgorithmIntermediate
KMP - Prefix Function Applications
The prefix function π of a string tells, for every position, the length of the longest proper prefix that is also a suffix of the prefix ending there.
#kmp#prefix function#failure function+11
⚙️AlgorithmIntermediate
KMP Algorithm
The KMP algorithm finds all occurrences of a pattern in a text in O(n + m) time by never re-checking characters that are already known to match or mismatch.
#kmp algorithm#prefix function#failure function+12
⚙️AlgorithmAdvanced
Digit DP - Advanced States
Digit DP counts integers in a range by scanning digits from most significant to least while maintaining compact state information.
#digit dp#tight flag#leading zeros+12
🗂️Data StructureAdvanced
Suffix Array
A suffix array stores the starting indices of all suffixes of a string in lexicographic order.
#suffix array#lcp array#kasai algorithm+11