Minimum Number Of Swaps Leetcode Javascript Practice