Pinterest Interview Question

Interval scheduling problem without overlapping