0

# A palindrome is a word, phrase, or sequence that reads the same backwards as forwards. Given a palindrome write a program to pri

Input ABCDCBA Output ABCDCBA ACBDBCA BACDCAB BCADACB CABDBAC CBADABC Explanation Since there is only one D, it can only be the middle letter in the palindrome. The remaining lettere A, B, C can be arranged in 6 possible ways and each way gives rise to a palindrome.

3 Réponses

0

Right
,mjak

0

Right

0

Right