Ad
  • Default User Avatar

    The author means that there won't be a negative amount of passengers, so WE don't need to error check for his tests.

  • Custom User Avatar

    In the problem condition the author suggests that passanger rest in the bus ALWAIS (for any bus stop) great or equal to zero. But tests don't check this!

  • Custom User Avatar

    I don't undestand:
    arrays = [[-8, -8], [0, -6], [4, -8], [2, -4], [-2, 4], [-1, -5], [7, -2], [-5, 4]]
    shift = 1
    my result: [-8, -8, -2, -6, -6, 3, 2, -7, 4]
    estimated result: [-8, -8, 0, -6, 4, -8, 2, -4, -2, 4, -1, -5, 7, -2, -5, 4]

    Manually:
    -8 -8
    0 -6
    4 -8
    2 -4
    -2 4
    -1 -5
    7 -2
    -5 4
    -8 -8 -2 -6 -6 3 2 -7 4 # as in my solution

    Why estimated result is -8, -8, 0, -6, 4, -8, 2, -4, -2, 4, -1, -5, 7, -2, -5, 4 ???
    Such result is correct for shift = 3

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    You forgot that ascii-code contains some symbols wich ascii-number less than ascii-code for digits, for example '#@%'. So, if input string will contain words with one of those symbols, your solution will work wrong.
    Try this: "A9# fg1 ghji3%"

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    This code don't pass the test below:
    [[2,4], [2,6], [2, 8]] -> [[6, 12], [4, 12], [3, 12]]
    See kata condition for Bash