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

Illustrative example for suffix array + LCP (Kasai). More...

#include <iostream>
#include <string>
#include <Suffix_Structures.H>
Include dependency graph for suffix_array_lcp_example.cc:

Go to the source code of this file.

Functions

int main ()
 Example program that builds and prints the suffix array and Kasai LCP array for a sample string.
 

Detailed Description

Illustrative example for suffix array + LCP (Kasai).

Definition in file suffix_array_lcp_example.cc.

Function Documentation

◆ main()

int main ( )

Example program that builds and prints the suffix array and Kasai LCP array for a sample string.

Prints a header, the input text ("banana"), and a table with each index, the suffix array value, the corresponding suffix string, and the LCP value computed by the Kasai algorithm.

Returns
int Exit status code (0 on success).

Definition at line 52 of file suffix_array_lcp_example.cc.

References Aleph::divide_and_conquer_partition_dp(), Aleph::lcp_array_kasai(), and Aleph::suffix_array().