My solution of leetcode