Leetcode Activity Selection Problem