My solution for leetcode problems