Amazon Interview Question for SDE-2s


Country: India
Interview Type: In-Person




Comment hidden because of low score. Click to expand.
1
of 1 vote

Since I feel that just posting a design question is of a little use, I am also writing a few tips for you - from the discussion I had with the interviewer:

1) The reservation system should be able to handle reservations from different restaurants. (eg. zomato)

2) How would an individual restaurant be notified, when a booking a made? Think of using an observer design pattern here.

3) An individual restaurant could have tables of many types - table for 2, table for 4, sofas etc. - You can use a factory design pattern here, to get a table for the requested type.

4) How would you handle queries of the following form:
     a) Is a table for 2 available in restaurant #A, between 3:30 to 4:30 pm?

5) You should not allow all tables to be booked online - leave some free for personally visiting customers.       

6) How about if a restaurant owner decides to inquire about the busiest time of the day? What would you want to store for this in the persistence storage?

7) In case a restaurant has multiple floors - and a table for 2 is being requested to be booked, would you just pick a random table from your restaurant (maybe on a separate floor) and book it - If not how would you handle that?

8) How would you make your system scalable - Object caching(Redis/Memcached), using load balancers, using a service oriented architecture etc.

9) A feedback system for a restaurant?

Few tips:

- Discuss with interviewer first, to define a scope for the restaurant - what your system can and can't do.

- Start with a very high level overview of how your (entire) system would work - A flow of events, if you will.

- Provide high level details for your design.

- Provide low level details for your design (restaurant specific booking)

PS: All the above questions were not asked by the interviewer, instead I came up with these use cases and proposed solutions to them. Please feel free to comment on any of them if you do not like it.

Hope this helps.

- Abhigyan Mehra November 25, 2015 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Can you please share the solution as well that you designed?

- Darky January 28, 2016 | Flag
Comment hidden because of low score. Click to expand.
1
of 1 vote

Can you please share the solution as well that you designed?

- test January 28, 2016 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

I'm also interested in the solution for this question.

- Wisdom-17 December 20, 2017 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More