Find Length of Longest Good Subsequence
A good subsequence is defined as any subsequence obtained from a string by removing 0 - any numbers of characters.
The length of the subsequence should be even.
If the length of the subsequence is m then the first m/2 characters should be equal and the next m/2 characters should be equal.
For example, '2222', '333444' are good subsequences, while '2221', '2344234' are not good subsequences.
Find the length of the longest good subsequence.
Complete the function findLengthOfLongestGoodSubsequence in the editor.
findLengthOfLongestGoodSubsequence has the following parameter:
String s: the string to analyze
Returns
int: the length of the longest good subsequence
1Example 1
2Example 2
3Example 3
4Example 4
Constraints
Limits and guarantees your solution can rely on.
An unkown mystery for now