New update is available. Click here to update.

Posted: 6 Nov, 2020

Difficulty: Hard

```
You don’t have to print anything, it has already been taken care of. Just complete the function.
If there is no common subsequence, return 0.
```

```
The first line of input contains an integer ‘T’ denoting the number of test cases.
The first line of the testcase contains three space-separated positive integers n, m, k denoting the length of the strings A, B, C respectively.
The second line of the testcase contains the string A.
The third line of the testcase contains the string B.
The fourth line of the testcase contains the string C.
```

```
For each test case, return the length of the longest common subsequence in all the three strings A, B, and C.
```

```
1 <= T <= 5
1 <= n, m, k <= 100
Where ‘T’ is the total number of test cases and n, m, k are the length of strings A, B, and C respectively.
Time limit: 1 second
```

SIMILAR PROBLEMS

Divisible Substrings

Posted: 29 Jul, 2022

Difficulty: Easy

Ninja and Numbers

Posted: 30 Jul, 2022

Difficulty: Moderate

Longest Palindromic Substring

Posted: 4 Sep, 2022

Difficulty: Moderate

Cakes

Posted: 23 Sep, 2022

Difficulty: Easy

1-3 Palindrome

Posted: 4 Oct, 2022

Difficulty: Easy

Categories:

Popular Courses: