Module contest_algorithms::string_proc[][src]

String processing algorithms.

Structs

Matcher

Single-pattern matching with the Knuth-Morris-Pratt algorithm

MultiMatcher

Multi-pattern matching with the Aho-Corasick algorithm

SuffixArray

Suffix array data structure, useful for a variety of string queries.

Trie

Prefix trie, easily augmentable by adding more fields and/or methods

Functions

palindromes

Manacher’s algorithm for computing palindrome substrings in linear time. pal[2i] = odd length of palindrome centred at text[i]. pal[2i+1] = even length of palindrome centred at text[i+0.5].