Smallest Number Following Pattern Leetcode Python Problems Practice