Merge intervals leetcode brute force. All memory units are initially free.