Concepts7

⚙️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

Minimum Rotation

The minimum rotation of a string is the lexicographically smallest string you can get by cutting it at some position and swapping the two parts.

#minimum rotation#booth algorithm#duval algorithm+12
⚙️AlgorithmAdvanced

Lyndon Factorization

A Lyndon word is a string that is strictly smaller (lexicographically) than all of its nontrivial rotations.

#lyndon word#duval algorithm#booth algorithm+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

Manacher's Algorithm

Manacher's algorithm finds the length of the longest palindrome centered at every position in a string in linear time O(n).

#manacher's algorithm#palindromic substring#longest palindromic substring+11
⚙️AlgorithmIntermediate

Longest Common Subsequence

The Longest Common Subsequence (LCS) between two sequences is the longest sequence that appears in both, not necessarily contiguously.

#longest common subsequence#lcs#string dp+12
⚙️AlgorithmIntermediate

Edit Distance

Edit distance (Levenshtein distance) measures the minimum number of inserts, deletes, and replaces needed to turn one string into another.

#edit distance#levenshtein#dynamic programming+11