Skip to content

Latest commit

 

History

History
3 lines (3 loc) · 290 Bytes

File metadata and controls

3 lines (3 loc) · 290 Bytes

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"