Abhigyan Mehra
BAN USER
Questions (4)
Comments (2)
Reputation 210
- 1of 1 vote
AnswersDesign a restaurant reservation system - You need to design everything from scratch - Identify actors in the system, identify what all data should be stored in persistence storage (and why). How would you make your design scalable?
- Abhigyan Mehra in India| Report Duplicate | Flag | PURGE
Amazon SDE-2 Software Design - 1of 1 vote
AnswersDesign a data structure which could perform the following operations in O(1):
- Abhigyan Mehra in India
- Insert(), Delete(), Search(), getRandom()
getRandom() should pick a "random" element from your data structure, and should not be predictable (for instance always picking the "first" element from your DS)| Report Duplicate | Flag | PURGE
Amazon SDE-2 Data Structures
Page:
1
Comment hidden because of low score. Click to expand.
Comment hidden because of low score. Click to expand.
1
of 1 vote
Correct, but also handle cases when the element is not present in the array.
- Abhigyan Mehra November 25, 2015Page:
1
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.
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:
Few tips:
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.
- Abhigyan Mehra November 25, 2015Hope this helps.