Maximum Overlapping Intervals Leetcode Javascript