Current Position: SDE1 at Amazon
Applied for Role: SDE2, Phonepe for Pune location
I had applied to Phonepe through a referral. The recruiter reached out to me after a few weeks. She mentioned I’ll be given a machine coding assignment to be completed within 24 hours. A discussion round around the same will be held afterwards.
Machine Coding Assignment
The following question was given:
Consider a microservice env where several systems use 1 central system for all their alert use-cases: Design and implement a system which can capture events generated by any system or user triggered (for simplicity), and raise an alert according to alert configuration.
Type of configurations:
SIMPLE_COUNT (which consists of count)
TUMBLING_WINDOW (which consists of count and windowSizeInSecs, Eg: 10 events in 1 hourbucket, you can assume that the bucket starts at 00:00 hour of the day)
SLIDING_WINDOW (which consists of count and windowSizeInSecs)
Follow-up Round
I had a follow-up round 3 days later. They asked me to explain my code and stopped me in the middle to ask questions about certain code choice, e.g., why you used a map here, is using the array the best approach here etc.
Afterwards, the discussion went mostly around improvements. I had used Strategy pattern in a certain case, where I had to initialise all the objects. Questions was that as number of strategies will increase, initialising through client code won’t be practical. I proposed a factory pattern based solution.
The interviewer asked me to code the same, I didn’t fully code assuming she wanted to understand the approach, which seemed so from our conversation.
Rejection Feedback
I received a system generated email 2-3 hours later stating they will not proceed with my application. While I was disheartened, I called the recruiter for feedback.
Feedback: Your code was modular, pretty clean and your organised your code pretty nicely. However, she fumbled and was a had confusion around the factory pattern. This was my first ever design round in a company. So learnings taken.


