Java Practice of leetcode's problems.