Ad
  • Custom User Avatar

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

  • Default User Avatar

    The idea is to "simulate" all the rows with an easy method: just take the numbers of customers and add to the queue with the lowest value. Then you return the highest value queue.

    in detail: first we create another vector of values of fixed size (n) and set the values to 0.
    then we iterate all the customers values (int i : customers) where i is getting the value of customers[0],[1]...etc; and we add that value to de lowest value queue.

    at the end we got a vector of n values (queues) and we just have to return the max value of them.