Skip to content

YorkCodeDojo/vehicles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

1-trillion line problem

Setup

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)

Exercises

  1. Download left.csv

  2. What is the total distance travelled by all vehicles?

  3. Which vehicle travelled the most distance?

  4. Which vehicle travelled the furthest in 5 minutes, and how far did they travel?

  5. How many times did vehicle 1 overtake vehicle 2?

  6. 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.

Files can be generated by:

generate_data left.csv --seed 1234 --cars 10 --hours 24

generate_data right.csv --seed 9999 --cars 10 --hours 24

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published