coded  by java about leetcode