The generated files contains a number of measures for your fleet of vehicles. Each measurement shows how far a vehicle travelled in one minute.
The solutions should be O(n) in time complexity. (ie sorting isn't allowed)
-
Download left.csv
-
What is the total distance travelled by all vehicles?
-
Which vehicle travelled the most distance?
-
Which vehicle travelled the furthest in 5 minutes, and how far did they travel?
-
How many times did vehicle 1 overtake vehicle 2?
-
It turns out that the data is often wrong, but that's ok as this file is only the measurement from the front left-hand wheel.
Using a second file using right.csv. This gives the data for the front-right wheel. Repeat the exercises using the average of the of the two measurements.
generate_data left.csv --seed 1234 --cars 10 --hours 24
generate_data right.csv --seed 9999 --cars 10 --hours 24