Given a palindrome , the function should return the the lexicographically smallest string that is not a palindrome by changing one character. The concept used in my code is that either the left most non "a" char should become an "a" character or the rightmost element should become "b" in case all elements are "a".
Given a palindrome , the function should return the the lexicographically smallest string that is not a palindrome by changing one character. The concept used in my code is that either the left most non "a" char should become an "a" character or the rightmost element should become "b" in case all elements are "a".