Maximum Swap Leetcode Javascript 30