Swap one character to get Longest Repeated Character in a string.
I got till time complexity of O(n2) is there a way for O(n) ?