The code for leetcode test