Java solutions for leetcode online judge