Max and Palindromes Solution
SOLUTION
” CLICK HERE “
Max has recently studied about palindromes and yesterday he came across a simple problem in which he was given a string and he had to report the total number of unique palindromes of length 3 which can be formed by using the characters of the string.
Note – The string contains only lowercase characters.
Input:
- A single string S.
Output:
Total number of unique palindromes of length 3.
Constraints
Sample Input:
aabc
Sample Output:
2
EXPLANATION:
The 2 unique palindrome Max can form are and ,

Social Plugin