Java solutions on leetcode online judge