Minimum platforms
Which train leaves doesn't matter, only how many are standing at the station. So sort the arrivals and the departures separately and walk both like a timeline: when the next arrival comes no later than the next departure, a train takes a platform; otherwise one frees a platform. The most platforms in use at once is the answer.
Each bar is a train on the clock, numbered by its index; the dashed line is the event being handled. arr and dep are the sorted times with their pointers i and j; station shows the trains at a platform.