Leetcode problems in JAVA