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.
He gets lost between 5 and 6, I think going back to 4 might be the problem.
Need some help clarifying this kata.
In the case of this
riders([21, 35, 28, 18, 13, 23, 45], 6)
, here's my reasoning:So we need 4 riders in total. But the test case says 3. What did I get wrong?
.
@myjinxin - You are a man of few words :-)
.
Kata which are nothing more than recipes where every nuance is spelled out are boring. If all you have to do is code exactly a pre-described algorithm, then where's the fun in that?
I prefer to write Kata which appear easy at first, but may contain subtle "gotchas". They teach you to think before you code. They teach you to be more patient - to avoid leaping to conclusions and going off half-cocked. They re-enforce RTFM lessons. But mostly it just makes finding the solution much more satisfying.
This comment is hidden because it contains spoiler information about the solution
on the contrary, it's perfectly in adequation with the provided information... ;)
This comment is hidden because it contains spoiler information about the solution
nope, you're wrong. Rider 3 cannot get to S6.
Please check expected value for ([33,8,16,47,30,30,46],5). Your code expects 5, while it looks to me that the correct answer is 4.
Here is the screenshot of expected. http://rgho.st/6HgTK5QG4
And here is a picture (like the one in your example) that proves 4.http://rgho.st/private/65nspjs9c/59f62919b9838551cd0aba66bf51a646
Everything needed to solve this Kata is written in the description.
If more examples are needed, just print the arguments, and press the
Attempt
button.I agree that it is not ideal, but inspiration failed me...
distanceToNextStation
ormilesBetweenStations
seemed too cumbersomedistances
seemed too vagueAnd
stationX
is just pathethic really...But, of course, there is nothing to stop you naming the argument as you wish to make your solution code more readable.
What name did you did you pick?
But what if he needs
puts(...)
O_o(Even though his profile says he's using Python
:D
)print(...)
System.out.println(Arrays.toString(...))
console.log(...)
choose your weapon... ;)
Loading more items...