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.
Thanks for writing this. I was passing the test but when i submitted i got "expected: but was:" on the true part, had no idea why. But this was the reason.
Would be good if this was made clear in the description.
No special coding skill needed here, but some mathematic knowledge.
see bootstrap
Please use spoiler
This comment is hidden because it contains spoiler information about the solution
Constant time. No loops, or recursive function calls that are dependent of some variable. Look for Big-O-Notation.
Probably, but that's a little bit hard to answer without code.
It is fine, although the lookup in objects is
O(log n)
notO(1)
. Still fast enough for the kata. However, I think that yourgetMean
isn'tO(1)
, butO(k)
, wherek
is the number of different temperatures that have been encountered so far (by the way, this also called linear time complexity). So you probably need to speed upgetMean
a little bit.