Java Solution without using any additional char array (100% faster)
class Solution {\n    public String breakPalindrome(String palindrome) {\n        \n\t\tint n = palindrome.length();\n        if (n == 1) return "";\n        St
class Solution {\n    public String breakPalindrome(String palindrome) {\n        \n\t\tint n = palindrome.length();\n        if (n == 1) return "";\n        StringBuilder sb = new  StringBuilder(palindrome);\n        \n\t\t// loop only till n/2 as the  string is already given as palindrome\n        for  (int  i=0; i<n/2; i++){\n            if(palindrome.charAt(i) != \'a\'){\n                sb.setCharAt(i,\'a\');\n                return sb.toString();\n            }\n        }\n        \n        sb.setCharAt(n-1, \'b\');\n        return sb.toString();\n    }\n}
['String', 'Java']