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.
It should return
new long[0]
. However, your code will not pass large numbers because it will iterate all combinaions ofa
andb
from 0 up ton
.There exists a formula which only requires an O(N) complexity.
What are we supposed to return for if there are no values (in C#)?
new long[0];?
List<long[]>{ new long[0] };?
I got all my successful cases working, but the null ones I'm not sure what they're asking for.
That's very kind - thank you!
No, because then you lose the current station and it's distance to travel.
Very clean code. Good job!