Get Minimum Moves Leetcode Playground Python