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.
No random tests
python new test framework is required. updated in this fork
C# fork
Animal
class to preloadedEquals
to be able to compareAnimal
s directlyNot backwards-compatible, because the
Animal
class was defined in the user file instead of preloaded, which I think is bad. Feedback is welcome, I'm not proficient in C#fork
Not backwards-compatible, because I think the setup was bad:
Animal
was defined in the user code instead of preloaded. I'm not an expert at C#, so feedback is welcome. Added random tests, proper assertion messages, purity checks.approved
Scala translation
JS fork approved.
Fixed
fork for JS checking for shallow copy (even the reference solution was mutating the input ._. )
it is not specified whether the copy should be shallow or deep either
This comment is hidden because it contains spoiler information about the solution
C#:
Actual and expected in some fixed tests are swapped
No random tests
There are possible sources of floating point errors in the kata (mostly on
AverageLitres
), which the tests doesn't account for.Odometer wraps around at certain values, and there is no guaranteed that it will always be strictly increasing over time for the entire span of input data either (for example, if it is replaced or tampered with). Unless it is strictly increasing there will be a difference in
last - first
vs.max - min
, so either this should be explicitly specified, or it should be specifically tested.FillUp
andMonthlyFillUpSummary
should not be defined in user code space. They should be defined inPreloaded
.Loading more items...