Minimum Number Of Swaps Leetcode Javascript Solution