Non Overlapping Intervals Leetcode Solution 1