Interval Scheduling Problem Leetcode Python