MCPcopy Create free account
hub / github.com/EbTech/rust-algorithms / palindromes

Function palindromes

src/string_proc.rs:294–318  ·  view source on GitHub ↗

Manacher's algorithm for computing palindrome substrings in linear time. pal[2*i] = odd length of palindrome centred at text[i]. pal[2*i+1] = even length of palindrome centred at text[i+0.5]. # Panics Panics if text is empty.

(text: &[impl Eq])

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

test_palindromeFunction · 0.85

Calls 1

pushMethod · 0.45

Tested by 1

test_palindromeFunction · 0.68