Data Structures & Algorithms in C++
Goodrich, Tamassia, Mount and Goldwasser
Loading...
Searching...
No Matches
Namespaces | Functions
lcs.h File Reference
#include <algorithm>
#include <string>
#include <vector>
Include dependency graph for lcs.h:

Namespaces

namespace  dsac
 Code from the zyBook "Data Structures and Algorithms in C++" by Goodrich/Tamassia/Mount/Goldwasser.
 
namespace  dsac::text
 Code from the chapter "Text Processing".
 

Functions

std::vector< std::vector< int > > dsac::text::lcs (std::string &X, std::string &Y)
 Returns table such that L[j][k] is length of LCS for X[0..j-1] and Y[0..k-1].
 
std::string dsac::text::reconstruct_lcs (std::string &X, std::string &Y, const std::vector< std::vector< int > > &L)
 Returns the longest common substring of X and Y, given LCS table L.