Pinterest interview question

Interval scheduling problem without overlapping