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.
Sure, the definition of double factorial can be extended to give results for negative odd numbers.
Ask for all of those, or none of those, not just
-1 -> 1
.ETA: asking for all of 'em may be different enough to normal factorials that it would not be retired.
Both fixed tests and random tests could use some clearer organization. One big lump titled "tests" which attempts to test EVERYTHING just looks bad. Fixed tests could be grouped per tested scenario (scenarios could be: there is still time, there is no more time, there is exactly as much time as needed, and maybe ones which require formatting of minutes with leading zeros), and properly titled groups could improve user experience for users failing only some tests. Presenting inputs of faield tests would also be helpful. It could be also nice to explicitly specify what is expected result for inputs where Alex would study exactly until 22:00.
Targeted generators for random tests would improve coverage of random tests. Currently, random tests almost never generate cases when Alex would finish studying at 22:00. My solution passes no matter if I return
true
orYou have XXX time left
for such cases. It passes all random test no matter if I doif(timeLeft > timeNeeded)
, orif(timeLeft >= timeNeeded)
.Indentation is messed up in some palces, some lines are not indented correctly.
You can check JavaScript tests of Even or odd or Leap Years kata for examples.
Hi,
Unfortunately, this has already been done. Moreover:
Cheers
Input validation has been done. Please just don't.
Kata is underspecified. What constitutes an invalid range? Are the range boundaries inclusive or exclusive?