Top Array Problems Leetcode Contest Solution