Minimum Swaps To Sort By Digit Sum Leetcode Python