Java 100% 0ms | Simple Approach w/ Video Explanation
Please Upvote if you find this Explanation helpful\n\nVideo Explanation\nBreak a Palindrome | YouTube\n\nJava Solution\n\n//0ms\nclass Solution {\n    public St
*Please **Upvote** if you find this Explanation helpful*\n\n**Video Explanation**\n[Break a Palindrome | YouTube](https://www.youtube.com/watch?v=dIcNa1Oi8xU&feature=youtu.be)\n\n**Java Solution**\n```\n//0ms\nclass Solution {\n    public String breakPalindrome(String palindrome) {\n        if(palindrome.length() <= 1)\n            return "";\n        char[] ar = palindrome.toCharArray();\n        \n        for(int i=0;i<ar.length/2;i++)\n            if(ar[i] != \'a\'){\n                ar[i] = \'a\';\n                return String.valueOf(ar);\n            }\n        \n        ar[ar.length -1] = \'b\';\n        return String.valueOf(ar);\n    }\n}\n```
['Java']