+ 1

🔡 CHALLENGE 🔢 CONSIDERED PALINDROME!

Note:A string is considered palindrome if it stays the same when you reverse it. User is to give a string of 2+ characters to the program, and it should swap 2 characters at different positions to make the string palindrome (it must do this step ONLY once). Print "Yes" if it is possible to make string palindrome, otherwise print "No"! For example: 1) input: ahah output: yes 2) input: alanl output: no Enjoy and Happy coding!

31st Oct 2017, 8:39 PM
TheSage
TheSage - avatar
7 Answers
+ 10
Nice challenge 👍 I'm late, but here's : https://code.sololearn.com/cH4YmqHaxFZV/?ref=app
10th Nov 2017, 11:34 PM
LukArToDo
LukArToDo - avatar
+ 2
what do you mean by 'it must do this step only once'? do you mean only 2 characters will be selected and swap in different positions?😦
1st Nov 2017, 12:25 AM
Jonathan Pizarra (JS Challenger)
Jonathan Pizarra (JS Challenger) - avatar
1st Nov 2017, 12:44 PM
hmysjiang🍀
hmysjiang🍀 - avatar
+ 1
heres mine only one time swap to make palindrome prints swapping indices too https://code.sololearn.com/c890nt0UY3wL/?ref=app
1st Nov 2017, 9:45 AM
sayan chandra
sayan chandra - avatar
+ 1
Jonathan, yes, you can swap 2 characters between each other, like a,b = b,a but only one time
1st Nov 2017, 3:53 PM
TheSage
TheSage - avatar
- 1
a new challenge... get refreshed https://www.sololearn.com/discuss/817002/?ref=app
2nd Nov 2017, 5:24 PM
sayan chandra
sayan chandra - avatar