Ad
  • Custom User Avatar

    For me, description looks fine. Actually, YOUR POST pushed me towards an easy ground-roof-ground solution, haha. Even though clearly it's not how the lift is supposed to move. Idk if we should hide this thread. It felt like cheating

  • Default User Avatar

    LOL!!! I DID IT!
    Just in time 16248 ms
    And most likely one of the stupiest solutions.
    And all the glory and rewards along the way (ranking up in java, ranking up total, exceeding 2000 honor points).

    BTW the tip of trying it multiple times is golden. There is a luck factor.
    1st trial: passed 294 tests
    2nd trial: passed 263 tests
    just out of frustation I clicked again and BANG!
    3rd trial: passed all tests

  • Default User Avatar

    thx, I just misread it. I thought he meant for java max size would 250x250!

    OK, 250 tests then.

  • Custom User Avatar

    It's in the description.

  • Default User Avatar

    How many random tests are there?

    If I am close I keep trying, but maybe there 500-1000 more. In this case I've something more useful to do.

  • Default User Avatar

    Yes, you're right! But that's exactly the point.
    I just stated out that this hint was for me misleading and pushed me towards a wrong direction.
    And if it pushes someone (in this case me) into a wrong direction, then something about this hint isn't great.
    This whole thing is just a suggestion. Take it or leave it. It's entirely up to you.

  • Custom User Avatar

    Perhaps you are only describing how you own implementation works... but not actually a requirement of the rules?

  • Default User Avatar

    Hmmm, I don't what I should respond to this. I've mentioned twice that it goes there but doesn't stop.
    Sorry, but your reply isn't really an answer.

  • Custom User Avatar

    The Kata output is:

    A list of all floors that the Lift stopped at (in the order visited!)

    So, if what you say was true then the top floor of the building should be part of every answer.

    But it isn't.

  • Default User Avatar

    First of all thank you for this wonderful kata! It's very realistic and of so much use for other problems.

    The instructions are amazing.
    But there is one thing I don't really like:
    The hint the lift tries to be smart part. It may continue in the same direction. (I think this is misleading and make things more complicated than neccessary)
    It actually continues in the same direction until it isn't possible anymore. The lift just doesn't stop, unless it has to (somebody wants to leave or enter the lift).

    Example: lift is moving upwards and is in floor 6 of 7, the lift is empty.
    It always moves to floor 7 (even if there isn't anybody) and then turns around and moves downwards it just doesn't stop until it reaches a floor in which someone is waiting for the elevator moving downwards.

  • Default User Avatar

    because you can replace your final result following rule one