A palindrome is a word, phrase, or sequence that reads the same backwards as forwards. Given a palindrome write a program to pri | Sololearn: Learn to code for FREE!

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.

7/29/2017 4:26:45 AM

Aravindhan

3 Answers

New Answer

0

Right ,mjak

0

0