60ms Javascript solution
\nvar breakPalindrome = function(palindrome) {\n    if (palindrome.length === 1) return \'\';\n    let acount=0;\n    \n    for (let i=0; i<palindrome.length; i
```\nvar breakPalindrome = function(palindrome) {\n    if (palindrome.length === 1) return \'\';\n    let acount=0;\n    \n    for (let i=0; i<palindrome.length; i++) {\n        if (palindrome[i] === \'a\') acount++;\n    }\n    \n    if (palindrome.length-1 === acount) return palindrome.slice(0, palindrome.length-1)+\'b\';\n    for (let i=0;i<palindrome.length; i++) {\n        if (palindrome[i] !== \'a\') {\n            return palindrome.slice(0, i)+\'a\'+palindrome.slice(i+1);\n        }\n    }\n    return palindrome.slice(0, palindrome.length-1)+\'b\';\n};\n```\n\nTime Complexity: O(n)
['JavaScript']