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.
Maybe because you mutated the input? test [North, East, South, West] should be [North, East, South, West].
For Python just round it with round(), as explained by the author in the comments buried below :-
Hi, you should simply use round instead of ceil
Hi could anyone explain what does left-upside and total upside mean?
How to understand this answer...
I suppose by reducing a check in every iteration (whether i is smaller than the length of array) and do some set-up/clean-up once at the start or the end, this will improve the runtime of the algorithm. Just some thoughts, thanks for the comment:)
This algorithm is nonsense. The logic behind it is completely random which only makes it hard to understand what it is supposed to do, you're providing no improvement over a regular loop, and in Ruby you could have just used
arr.index(x)
to achieve the same thing.Interesting kata:)
Recursion for the win! nice.
@TlylT
Oh yes, thank you!
@stellartux made a Julia translation
Maybe you didn't read the description correctly. It is 8 steps. Try rereading the description.
Test.assert_equals(minimum_steps([19,98,69,28,75,45,17,98,67], 464), 8)
Is there a mistake in the above test case?
8 steps => should be 516 ?