my solution of leetcode