Leetcode Minimum Swaps To Sort Array In Python