--- id: suffix-array title: "Suffix Array" author: Benjamin Qi description: "Quickly Sorting Suffixes of a String (and Applications)" prerequisites: - Gold - Hashing frequency: 1 --- import { Problem } from "../models"; export const metadata = { problems: { sample: [ new Problem("YS", "Suffix Array", "suffixarray", "Easy", false, [], ""), ], lcpSam: [ new Problem("YS", "# of Substrings", "number_of_substrings", "Easy", false, [], ""), ], lcp: [ new Problem("Plat", "Standing Out from the Herd", "768", "Hard", false, [], ""), new Problem("CF", "Two Prefixes", "contest/1090/problem/J", "Hard", false, [], ""), ], burSam: [ new Problem("CSES", "String Transform", "1113", "Easy", false, [], ""), ], runSam: [ new Problem("YS", "Run Enumerate", "runenumerate", "Hard", false, [], ""), ] } }; ## Resources Videos & Practice Problems ## Suffix Array ### Implementations $O(N\log N)$ (recommend that you also test against brute force for many small strings) ## LCP Array Quickly compute longest common prefix of two suffixes. ## Inverse Burrows-Wheeler could be simpler? CSES Guide? ## Run Enumerate could be simpler? (describe how to do easily w/ suffix array)