Top Array Problems Leetcode Python