lundi 7 octobre 2019

How can I break a palindrome?

Say I have a palindrome "aba" or "abba" I have to create a function that would return value that's less than the original so the returned would be "aaa" or "aaba".

I'm running this on C++ in a hackerrank online challenge

//Sorry i couldn't really figure it out

breakAPalindrome(string s) {

}

Aucun commentaire:

Enregistrer un commentaire