solve two leetcode problems