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.
Total driving time is over 10 hours. Why does it expect the result to be true?
Node 18. (
mocha + chai
) should be enabledTests are vulnerable to input modification
Missing such test cases for rest times between 16-29 minutes and 31-44 minutes, which will invalidate my solution.
[["8:00-10:00","Drive"],
["10:00-10:20","Rest"],
["10:20-12:20","Drive"],
["12:20-12:55","Rest"],
["12:55-15:00","Drive"]
];
(expected true)
This comment is hidden because it contains spoiler information about the solution
python new test framework is required. updated in this fork
Hi,
Not enough example tests. The current ones are mostly useless because anything "slightly" wrong can pass them. At the very least the fixed tests should be added.
Cheers
This comment is hidden because it contains spoiler information about the solution
Also, this kata is too similar to the "harder" version of the same task: a passing solution here clears 80% of the task on that kata (as there are only 2 additional checks). There are not much reasons to split that kata into this one.
This comment is hidden because it contains spoiler information about the solution
The task is under-specified: does it count if there is any period of time in the schedule where 4.5 hours of driving without 45 or 15/30 minute rest occurs? Or does it start counting from the beginning and resets whenever 45 or 15/30 minute rest occurs?
What is eligible as 15/30 minute rest? For example, does 45/30 count? What about 15/30/30?
This comment is hidden because it contains spoiler information about the solution
requiredWeight
is specified asinteger
butavailablePlates
is specified asinteger/float
without any restrictions. This does not hold water in general (the probability of adding random floats and getting an exact integer sum is close to 0), and in fact there is a restriction:plate = c * 2^n
for positive integerc
and integern
, which will always be exact as a float. This should be specified. (Or just use integers? They're all integers divided by certain powers of 2 anyway, so there's no reasons to make them floats.)Why is
testIt
intentionally made opaque and inaccessible? Even the fixed, sample tests uses them when there are only 1 possible result and can easily just do a normal test assertion. It is unclear what is actually expected.D translation
Loading more items...