Leetcode java data structures