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.
For me the problem with the random tests persists... see my issue above
I'm also seeing the phenomenon that
theLift
is called twice in the random test cases... Unlike pacman09 I don't see how I can sensibly fix this. I get results like this:The first test case always passes, for example:
R#0: 20 floors, 41 people, lift holds 4
theLift([[],[0],[0,1],[],[]], 4, [0,1,2,3,4], 0) -> [0,1,2,3,4,2,1,0] // expected result
theLift([[],[4,3,0,2],[3,0,1],[],[]], 4,, [], 1) -> [0,1,2,3,4,2,1,0] // still expected result
Noticeably the title of the test cases matches only the capacity used... The first call looks like a intermediate result from the second run (though my algorithm is not recursive). It gets stranger in the subsequent (failing) cases:
R#1: 15 floors, 17 people, lift holds 3
theLift([[],[0],[0,1],[],[]], 4, [0], 0) -> [0,2,1,0] // expected result
theLift([[],[4,3,0,2],[3,0,1],[],[]], 4, [], 1) -> [0,1,2,3,4,2,1,0] // seems correct to me for the input, though
Despite the different title, the test cases uses the same parameters as the first one, except the third parameter. Fhe input and outpt for all following test cases look identical to this one, including an identical expected result...
@pacman. Yeah that looks bogus to me also. What was supposed to be a recusive call turned into a weird symbiotic relationship with the user solution. Anyway, it's fixed now. Thanks very much for reporting this, and sorry for all the trouble it caused you. The translator will be shot at dawn.
I'm also using TypeScript and am very confused by these parameters! Please at least add and describe them in the instructions.