Ad
  • Custom User Avatar

    Hello cirorizzo,

    If I did understand, you are asking for ((((()()())))()()()()))))())()()() ? (nested parenthesis)

    Did you mean that? If not let me know!

    Best,
    TDRS

  • Default User Avatar

    The array result has been sorted such that the value in the first index represents the cashier with the shortest line. Because this is a greedy algorithm, the optimal solution involves adding this next customer to the shortest line (time wise). Does that help?