A palindrome is a word, phrase, or sequence that reads the same backwards as forwards. Given a palindrome write a program to pri
3 Answers
New AnswerInput 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
Aravindhan3 Answers
New AnswerSololearn Inc.
535 Mission Street, Suite 1591Send us a message