my solution for problems on leetcode