Verkada Interview Question

leetcode question non overlapping intervals