Find Longest Awesome Substring
Jul 5, 2021
Input: s = "3242415"
Output: 5
Explanation: "24241" is the longest awesome substring, we can form the palindrome "24142" with some swaps.Input: s = "12345678"
Output: 1Input: s = "213123"
Output: 6
Explanation: "213123" is the longest awesome substring, we can form the palindrome "231132" with some swaps.Input: s = "00"
Output: 2Basic Idea:
Java Code:
Last updated