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.
This comment is hidden because it contains spoiler information about the solution
That's cheating.
My solution MinMax also gets time out error.
But there is less than 20K possible positions.
Use a cache !
I believe the "List.append" to be O(x) (the x in xbonacci is the size of the list).
Maybe a Queue is more efficient..
Do the sum is also O(x), memorize the last sum, substract the outgoing value and add the previous result is a clever option.
It should be.
Actually, with laziness the tests doesn't pass.
La list c'est pourri, fait du linq non de dieu.
Le select ne set a rien avant le count :P
In C# you should use generic to be more Linq-Like (ie: GroupWhile'T').
Tests in C# are bugged. Equality comparaison for list of list can't be done so easily.
This comment is hidden because it contains spoiler information about the solution
"Your task is to return number of people in the bus after the last bus station."
At last bus station, there is a message: "All passengers please leave the bus."
So the hanswer is 0 (since the driver is not a people).
Joke asside a little rewrite look like necessary.