Redirecting to
NADOS

Longest Repeating Subsequence

1. You are given a string str.
2. You have to find the length of longest subsequence which is appearing twice in the string.
3. Every ith character in both the subsequences must have different indices in the original string.
Input Format
A string str
Output Format
A number representing the length of longest repeating subsequence.
Question Video
Constraints
1 < length of strings str <= 2000
Sample Input
abcdgh
Sample Output
0


  • Asked in Companies
  • Related Topics






Video Solution

Code Solution

Run
 
Run
Id Name