Verkada interview question

leetcode question non overlapping intervals