Maximum Swap Leetcode Javascript Practice Problems