← Interval & Math

Micro-Drill #115 — Sort by end time

Interval & Math Target: 5s

Sorting by end time is the greedy strategy for interval scheduling and activity selection.

intervals.sort(key=lambda x: x[1])

Type it from memory. Go.

Practice Problems

Related Coding Drills

← Micro #114 Micro #116 →