Top Array Problems Leetcode Solutions Java