Skip to content

Latest commit

 

History

History

Longest Repeated Subsequence

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Given a string, print the longest repeating subsequence such that the two subsequence don’t have same string character at same position, i.e., any i’th character in the two subsequences shouldn’t have the same index in the original string.

Input: str = "aabb"

Output: "ab"