Amazon VO Coding Interview Question: Reservation-Only Restaurant Table Arrangement

17 Views
No Comments

You are running a reservation-only restaurant.

You already know how many parties have booked for today, and you need to arrange the required number of tables based on the reservations.

Problem 2: This is a follow-up question.

Now we have a fixed number of tables with various sizes, and we also know the sizes of the parties for each reservation.

How can we optimize the table arrangements to minimize idle time?

This question is about planning table arrangements in a reservation-only restaurant. The first part asks you to prepare the required number of tables from the booking information, and the follow-up adds fixed table sizes and party sizes, asking you to minimize idle time by assigning parties efficiently. A typical solution focuses on matching party sizes to table capacities, often using sorting and a greedy strategy, with a heap or two-pointer technique when efficient reassignment is needed.

END
 0