my solution in leetcode's problems