Count number of repeated characters from a String which is a palindrome and then calculate the product of those separate counts.

How will you count a number of repeated characters from a String which is a palindrome and then calculate the product of those separate counts? For example, if the String is ababa, the output should be the product of 3 a's and 2 b's which is 6. The program is implemented in Java. Algorithm: (1) … Continue reading Count number of repeated characters from a String which is a palindrome and then calculate the product of those separate counts.