DoorDash optimizes Dasher efficiency by assigning multiple orders from nearby restaurants to the same Dasher. This is called order stacking. Given a city map consisting of restaurants that have orders ready to be picked up at a specified time, determine the maximum number of orders that can be stacked/assigned to a single Dasher. Cell i, j of city represents a restaurant and city[i][j] represents the time at which an order is ready to be picked up from the restaurant.
An order can be assigned to the same Dasher if:
city = [
[9 ,9 ,4]
[6 ,6 ,8]
[2 ,1 ,1]
]Output = 4
Solved it with DFS. Took some hints from the interviewer, but was able to Solve it. Havent heard back from them in a while.