This is my code for leetcode.com