Leetcode Smallest Value Array Methods Python