Passengers Pick-up and Drop-off Algorithms (Car Pooling) via Greedy Algorithm
You are driving a vehicle that has capacity empty seats initially available for passengers. The vehicle only drives east (ie. it cannot turn around and drive west.) Given a …