Find length of the longest non-intersecting anagram Subsequence
Given a string S of length N, find the length of the two longest non-intersecting subsequences in S that are anagrams of each other. Input: S = "aaababcd"Output: 3Explanation: Index of characters in the 2 subsequences are: {0, 1, 3} = {a, a, b} {2, 4, 5} = {a, a, b} The above two subsequences of S a