We use cookies to provide you with an optimal experience and relevant communication.Cookie Policy
Back to course home
0% completed
Vote For New Content
Solution: Longest Repeating Subsequence
Problem Statement
Given a sequence, find the length of its longest repeating subsequence (LRS). A repeating subsequence will be the one that appears at least twice in the original sequence and is not overlapping (i.e. none of the corresponding characters in the repeating subsequences have the same index).
Example 1:
Input: "t o m o r r o w"
Output: 2
.....
.....
.....
Like the course? Get enrolled and start learning!
Table of Contents
Contents are not accessible
Contents are not accessible
Contents are not accessible
Contents are not accessible
Contents are not accessible