Amazon | Phone | Order management
Anonymous User
3280

The whole interview process is avaialble here: https://leetcode.com/discuss/interview-experience/671811/Amazon-or-SDE-3-or-June-2020-Reject

Question: Implement getOrder and addOrder methods (for an order management system). There was no additional info.

I started by asking if this was an algorithm or system design question, to which he replied that it was an algorithm question. I chose Java as my language.

I then, naively, spent too much time asking other questions, thinking this would be well perceived (since this is such an open ended question, I thought my requirement assessment skills were being evaluated). I asked:

  • What kind of orders do we have to deal with?
  • Does the system use any payment system API?
  • Should these methods return objects or web response objects (services)?
  • I discussed scalability topics, such as using the orderId + userId to shard the database if we are dealing with a huge system, etc.
  • Etc.

My second pitfall was not heeding the interviewer directions to the letter. As I was designing the entities, he kept saying (yeah, just keep it simple), and eventually he made clear he simply wanted to see some database implementation interface. I suggested we go with an SQL based solution so that we would have ACID properties. I then explained that we could have an Ibernate implementation, and that I would have an interface to deal with generic CRUDE db interfaces. As I didn't have much time left, I ended up implementing only a skeleton of the solution:

  • A skeleton of the getOrder and addOrder methods, just doing some object validation and calling the database interface;
  • A skeleton of the entity management (crude), without being able to really implement anything.

How woul you approach this problem? I was not prepared for a problem that was not well-framed, so I did very poorly (I was expecting a LeetCode-like problem).

Comments (1)