Maximum Swap Leetcode Javascript Interview