I didn't strictly prove it, but I guess my solution already finds the optimal.
It is straightforward to generalize my solution to generic cases parameterized on:
* the # of people and their speed
* the capacity of the car and its speed
The length of the distance is really irrelevant, because all we need to compute is a unit speed.
It is straightforward to generalize my solution to generic cases parameterized on:
* the # of people and their speed
* the capacity of the car and its speed
The length of the distance is really irrelevant, because all we need to compute is a unit speed.