Leetcode Solutions for java