This is my Java program  for Leetcode