PhonePe Machine Coding Round [ exp 1.7 years Backend Developer]
Difficulty: EASYCategory: InterviewExperienceFrequency: 1Asked On 2023-12-29Added By Anonymous
Source:Ā Link
š§ Experience: 1.7 years
ā
Outcome: Proceeding for next round
š° Compensation: unknown
š Location: unknown
š¢ Company: PhonePe
š Education: unknown
š Benefits: unknown
š
Offer Date: unknown
Recently attended PhonePe Machine Coding Round
YoE : 1.7 years
round number -1
Question : Write modular, Structured and Scalable Working Code for ECommerce application ( buyers side heavy)
Language - Java / C++
Time constrains - 2 hours
IDE - chooose on your own.
requirements : User authentication, Catalog creation, Checkout, OrderManagement and some minor other requirements
Result - Proceding for next round.
```
i build all the functionality using design patterns like template method, strategy, singleton, builder and somewhat bridge pattern.
i was not able to complete whole functionality because of time contraints.
```
```
followed by this there was 1/2 hour review interview round, in which interviewers dig down into the core logic of implementation and gave some challenging scenario of managing locking in inventory in distributed system of such ecommerce application.
the exact followup question was : how will you lock a quantity of 10 Pen in inventory in distributed environment.
my answer - i suggested to use redis sorted set to store timestamp whenever there is a checkout on a product, if 6 product are in checkout state add 6 timestamp in redis sorted set and expire them after 5 minutes to allow others to perform checkout.
```
remark : interviewer did not focus on if i was able to complete my assignment to whole, he was curious about challenges we could solve related to that scenario if given.