[][src]Function contest_algorithms::string_proc::palindromes

pub fn palindromes<T: Eq>(text: &[T]) -> Vec<usize>

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].

Panics

Panics if text is empty.