Ad
  • Custom User Avatar

    Aha Ok Thank you, I didn't notice that.

  • Custom User Avatar

    A person on 1st floor called the lift.

    new int[]{0}, // 1
    
  • Custom User Avatar

    How come the last test showed the lift stops on the 1st floor?! there is neither queue nor a request to go for the first floor in the queue list?

       int[][] queues =
        {
            new int[0], // G
            new int[]{0}, // 1
            new int[0], // 2
            new int[0], // 3
            new int[]{2}, // 4
            new int[]{3}, // 5
            new int[0], // 6
        };
        var result = Dinglemouse.TheLift(queues, 5);
        Assert.AreEqual(new[] { 0, 5, 4, 3, 2, 1, 0 }, result);