We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
The Longest Common Subsequence
The Longest Common Subsequence
Sort by
recency
|
154 Discussions
|
Please Login in order to post a comment
Please check your test case. This is giving a success output, but one of your test failing. Testcase 3 expecting :
27 76 88 55 94 42 56 74 69 7 94 41 8 71 15 43 3 23 49 84 98 89 24 20 14 88
But
27 76 88 55 94 42 56 74 69 7 94 41 8 71 15 43 3 23 49 84 73 89 24 20 14 88
is also a valid sub secuence for input50 46 16 27 89 79 60 76 24 88 55 94 57 42 56 74 24 95 55 33 69 29 14 7 94 41 8 71 12 15 43 3 23 49 84 78 73 63 5 46 98 26 40 76 41 89 24 20 68 14 88 26 27 76 88 0 55 99 94 70 34 42 31 47 56 74 69 46 93 88 89 7 94 41 68 37 8 71 57 15 43 89 43 3 23 35 49 38 84 98 47 89 73 24 20 14 88 75
include
include
include
using namespace std;
vector longestCommonSubsequence(vector& A, vector& B) { int m = A.size(); int n = B.size();
}
int main() { int m, n; cin >> m >> n;
}
standard method on the internet
Here is my solution in java, javascript, python, C, C++, Csharp HackerRank The Longest Common Subsequence