Leetcode Smallest Value Array Definition In Python