Skip to content

Commit

Permalink
Updated with memo global array as well
Browse files Browse the repository at this point in the history
  • Loading branch information
viren-sureja authored Sep 26, 2021
1 parent 51ab06a commit e1ac482
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion 03_string/09_longest_recurring_subsequence.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@


// ----------------------------------------------------------------------------------------------------------------------- //
int memo[1002][1002];
int LongestRepeatingSubsequence(string s) {
// Code here
int len = s.size();
Expand All @@ -29,4 +30,4 @@ int LongestRepeatingSubsequence(string s) {
}
}
return memo[len][len];
}
}

0 comments on commit e1ac482

Please sign in to comment.