leetcode work in JAVA