Ad
  • Custom User Avatar

    For me the problem with the random tests persists... see my issue above

  • Custom User Avatar

    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

    1. call:
      theLift([[],[0],[0,1],[],[]], 4, [0,1,2,3,4], 0) -> [0,1,2,3,4,2,1,0] // expected result
    2. call:
      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

    1. call:
      theLift([[],[0],[0,1],[],[]], 4, [0], 0) -> [0,2,1,0] // expected result
    2. call:
      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...

  • Custom User Avatar

    @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.

  • Custom User Avatar

    I'm also using TypeScript and am very confused by these parameters! Please at least add and describe them in the instructions.