53 const std::string text =
"forgeeksskeegfor";
56 std::cout <<
"Manacher Example\n";
57 std::cout <<
"Text: " << text <<
"\n";
58 std::cout <<
"Longest palindrome: " <<
r.longest_palindrome <<
"\n";
59 std::cout <<
"Begin index: " <<
r.longest_begin
60 <<
", length: " <<
r.longest_length <<
"\n";
Palindrome algorithms over strings.
int main()
Demonstrates Manacher's algorithm by computing and printing the longest palindrome in a sample string...
Main namespace for Aleph-w library functions.
Manacher_Result manacher(const std::string_view text)
Compute palindromic radii and the longest palindrome with Manacher.