Java solutions for LeetCode