[Java] Easy to Understand, 100% Fast
\n\nclass Solution {\n    public String breakPalindrome(String palindrome) {\n\t\t// impossible to break length-1 palindrome\n        if (palindrome.length() <=
\n```\nclass Solution {\n    public String breakPalindrome(String palindrome) {\n\t\t// impossible to break length-1 palindrome\n        if (palindrome.length() <= 1) {\n            return "";\n        }\n        char[] sArray = palindrome.toCharArray();\n        int lo = 0, hi = sArray.length - 1;\n\t\t// find and replace first non \'a\' with \'a\' from the first half of the palindrome\n\t\t// for odd-length palindromes, exclude the middle character\n        while (lo < sArray.length / 2) {\n            if (sArray[lo] != \'a\') {\n                sArray[lo] = \'a\';\n                return new String(sArray);\n            }\n            lo++;\n        }\n\t\t\n\t\t// the first half only has \'a\'s, replace the last character with its next neighbor \n        sArray[hi] = (char) ((int) sArray[hi] + 1);\n        return new String(sArray);\n    }\n}\n```
['Java']