Ad
  • Custom User Avatar

    according to the instructions "the elevator should take the second call if it is closest to both calls AND if both floors are in the same direction for the elevator AND both calls are in the same direction even if it needs to change it's direction once to pick them both up." How is floor 5 closer to -7 than a lift at -4 moving downwards?

  • Custom User Avatar

    Am I missing something here?

    [5,-5,{"floor":-4,"direction":"down"},{"floor":-7,"direction":"down"}]: expected 'right right' to equal 'right left'

    Right is closer to both, both are in the same direction and it doesn't have to change direction

  • Custom User Avatar
  • Custom User Avatar

    changed to

    There is a building with 2 elevators ('left' and 'right') and a bunch of floors (both negative and positive).

  • Custom User Avatar

    Description is indecisive about how many floors exist: if the actual range of floors can be unbounded in both positive and negative ranges, the description shouldn't start with and 5 floors (0, 1, 2, 3, 4) and then invalidate this statement at the end of the description, that's just being nasty and unnecessarily misleading.

  • Custom User Avatar

    Thanks for your efforts.

  • Custom User Avatar

    Important notes added to the description

    Notes:
    - if one or both calls come from the same floor as an elevator, these are considered to be on the same side of the elevator
    - if an elevator is closest to both calls, but the conditions to take both calls are not met, pick call1
    
  • Custom User Avatar

    fixed

  • Custom User Avatar

    Updated to node 18 and error messages improved.

  • Custom User Avatar

    fixed

  • Custom User Avatar

    fixed

  • Custom User Avatar

    I've updated the ref sol and made some edge cases more clear in the description. Could you retry?

  • Custom User Avatar

    The ref sol does not take into account one caller being on the same floor as both being on the same side (up / down) of an elevator. I'll rework the ref sol. This will probably invalidate most if not all solutions.

  • Custom User Avatar

    I'm going to study the solutions that consistently pass this kata and rework the description of this kata accordingly. It is clear that ref sol and description don't align perfectly.

  • Custom User Avatar

    I re-published the kata and re-raised pending issues.

    The necessity of resolving and re-raising the issues is a bit of a hassle, but hopefully it will not be necessary too often, since now old kata should not be auto-unpublished.

  • Loading more items...