Google interview question

Non overlapping interval leetcode question