my leetcode solution