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.
Love this one
Because the edge case with 16 bumps isn't tested.
Why >16 instead of >15? The challenge says over 15 bumps should return Car Dead.
An elegant soluton. Well done :)
Out of curiosity I ran a performance test comparing normal division with the division by bitwise shift in this case:
https://jsperf.com/numsum-division
The bitwise division is a little faster.
Very clever. I like the use of the shift operator to do the division.
Well that should be cleaner in the kata description which leave the door open for both aprouches.
But on the other hand that's pretty irrelevant for what this Kata is trying to show us.
@jhoffner conceptually, your solution doesn't make much sense - when you're storing the temperature, you add a timestamp to it which is the date at which the next-to-be-stored temperature was taken, not of the actual temperature you're storing. Also, you store a null value as the first temperature. Seems to me the test cases aren't very well written.
This comment is hidden because it contains spoiler information about the solution
All test passed but still get error
non_object_property_loa...operty 'length' of null
I too have the same error. If we are given the test arrays that fail we might be able to better decode the issue.
Why do i get an "Oups" error?