LeetCode solutions in Java