Legend:
- Unmodified
- Added
- Removed
-
Description
r2 r3 1 In this particular example the number of loops is output along with the value of O(n*m). This algorithm is less than perfect .1 In this particular example the number of loops is output along with the value of O(n*m). This algorithm is less than perfect; but as far as I can tell, does the job of finding the LCS. -
Code
r2 r3 11 11 << "First we proceed by going through X compared to Y and then " 12 12 "going through comparing Y to X. In either case we get 'a' not 'the' " 13 13 "longest subsequence." << std::endl << std::endl; 14 14 std::vector<std::string> vs; 15 15 std::string x="ABCDBAGZCDCA"; 16 //std::string y="BCADCGZ";17 std::string y="bcadcgz";16 std::string y="BCADCGZ"; 17 //std::string y="bcadcgz"; 18 18 //std::string x="ABCDE"; 19 19 //std::string y="abcde"; 20 20 size_t n=x.size(); 21 21 size_t m=y.size(); 22 22 size_t i(0), j(0), ii(0), jj(0);