Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
For the test bestStrategy(60, 10, 1), your test is looking for the strategy to be "HSS". The two pitstops take a total of 20 seconds. The 30 laps on soft tires reduce your overall time by 30 seconds. Thus, the "HSS" strategy yields 20 - 30 = -10 seconds savings in your overall time.
If however, you ran a single lap with hard tires and then ran the rest of the race on soft tires you would have an "HSSSS" strategy. The four pitstops take a total of 40 seconds. The 59 laps run on soft tires reduce your overall time by 59 seconds. Thus, the "HSSSS" strategy yields 40 - 59 = -19 seconds savings in you overall time, a far better strategy than "HSS".
I don't think the desired results are always optimal.
Nice kata!
Really enjoyed working through this one — clean, well‑designed, and satisfying to implement.
Thanks for creating it!
Description should be language-agnostic
Enabled in this fork
Enabled in this fork
Enabled in this fork
.
Quite a pretty kata of this series.
python new test framework is required. updated in this fork
Approved
python new test framework is required. updated in this fork
Python : Random tests to be updated to avoid solutions like this
The weirdest solutions pass in JS: https://www.codewars.com/kata/reviews/56b5ebb026fd54188b00001a/groups/62b35e53889d9000016ee91c
Tests should be improved.
JS: Random test rarely generate descriptive numbers.
Loading more items...