new sol for leetcode