Template Function ADS::lcsMemo

Function Documentation

template<class S>
int ADS::lcsMemo(const S &P, const S &T, long *solved = nullptr)

lcs() of the book, by memoization: -1 marks the subproblems not solved yet; the number of the ones solved goes to *solved, if given