PhonePe | SDE | BLR | July'24
Difficulty: MEDIUMCategory: InterviewExperienceFrequency: 1Asked On 2024-08-29Added By Anonymous
Source: Link
Company: PhonePe
Role: Software Engineer 2
Interview Stage: Onsite
Location: Bangalore
Year: 2024
Original Post Content:
R1: Machine coding
- Design a system which will maintain the version history of updates. create document update document change version of document go to a particular version of document delete a document Additional Requirement: user can do operations based on the access given
- You have to see the question from CodeSignal test and code in your IDE. Allotted time 2hrs but can take 30mins more, submit the code in a zip file over mail.
- Then after a couple of days, one engineer connected on a 30mins call to see the design. He did not go very deep into algorithms, just was interested in the classes. He liked the design but asked how much time I took as I had written so much code and so many classes? I told 2hr and some 20 minutes more. He said okay, HR will contact you. We reviewed the design on my laptop and not the one which I sent over mail. But I didn’t make any improvements after the submission.
R2: PS/DS
- In an array of integers. Count maximum integers you can add such that at any point they never go negative from left to right. ← However, the question language was given in a scenario and it boils down to this question. Explained and wrote code, but a typo sucked 5 extra minutes.
- sum-of-distances-in-tree LC hard Started with O(n*n) and eventually I gave an O(n) solution. He asked to write pseudo code only as the time was less.
R3: HM
- General intro about PhonePe business evolution.
- Why are you switching? What happened in the last company?
- Business side of previous organization?
- Why you switched the database from DynamoDb to Postgres?
- Types of indexing on PG?
- Questions around project that why you did and what you did?
- …
- At last gave a question: you are getting different types of exceptions in the service. You have to send alerts if a particular type of exception frequency exceeds a limit in a rolling time window. For example: if exception type A exceeds 5 times in 30mins or exception B exceeds 10 times in 1 hour. I gave a deque solution, she was not satisfied, she kept on saying that all operations will not be O(1).
R4: PS/DS - onsite
- Longest continuous subarray with absolute diff less than or equal to limit: Question available with this heading in Leetcode. I started with O(n*n*n) solution and optimized it to O(n*n*logn), then O(n*(logn)^2) then O(nlogn) and finally the most optimal solution O(n). Later on, he asked to write pseudo code. After nlogn solution he gave a hint to try using some different data structures.
R5: HM round again with 2 managers but with name Bar raiser
- What is the difference I found between the last 2 organizations I worked for?
- What thing I want to improve in the next 5 years?
- What hobbies I have apart from work?
- Why PhonePe?
- What factors you consider to join a company?
- Why your company moved from DynamoDb to PG? Did you try knowing the reason for this? I gave few reasons and told I was supposed to do only as SDE 1. But they want “why you are doing and what are you doing”.
- If I gave you to build a service from scratch, can you do it alone? Or will you need someone's help? I told yes I need someone to give/discuss a roadmap.
- A time when you had a conflict with some team member? I told a scenario of optimizing a query. In that also they told many aspects like index on the column in query, size of DB and so much.
Next Day, I received the mail with offer.