2 leetcode problems