Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
manacher_example.cc File Reference

Illustrative example for Manacher's palindrome algorithm. More...

#include <iostream>
#include <string>
#include <String_Palindromes.H>
Include dependency graph for manacher_example.cc:

Go to the source code of this file.

Functions

int main ()
 Demonstrates Manacher's algorithm by computing and printing the longest palindrome in a sample string.
 

Detailed Description

Illustrative example for Manacher's palindrome algorithm.

Definition in file manacher_example.cc.

Function Documentation

◆ main()

int main ( )

Demonstrates Manacher's algorithm by computing and printing the longest palindrome in a sample string.

Prints the input text, the longest palindromic substring found, its starting index, and its length to standard output.

Returns
int Exit status code; 0 indicates successful execution.

Definition at line 51 of file manacher_example.cc.

References Aleph::divide_and_conquer_partition_dp(), Aleph::manacher(), and r.