leetcode online interview problem