Amazon interview question

Design a restaurant reservation system

Interview Answer

Anonymous

13 Aug 2012

I drew up a few boxes to illustrate table objects (with available time slots for the evening), a table manager (to hold the table objects), customer objects (to associate various customers to tables via their reservations), some API's (e.g. "query the table manager to find an open table to fit a party of X"). As I worked up the diagram, I talked about the various pros and cons to the approaches. When we finished up, they seemed to be very unhappy about the fact I hadn't explicitly called out calendar dates in the reservation system (I had just gone ahead with an assumption that a customer was only going to be thinking about a reservation on one particular day at any time). So this team might have done a thumbs down on me.

4