solution to new problem in leetcode