my solution to LeetCode