solution to leetcode problems