I got the problem statement on 5th January 12 PM sharp. It was essentially to design Apache airflow type workflow execution engine. Sharing the summarized problem statement below.
Design and implement a dynamic workflow execution engine that supports the definition and concurrent execution of tasks with dependencies. A workflow is modeled as a Directed Acyclic Graph (DAG) where each node represents a task. The engine must determine the correct execution order based on dependencies and execute independent tasks concurrently. It should also handle retries for tasks that fail and provide detailed execution logs.
API/Operations
Constraints
I sat down with the problem statement from evening and was able to finish it by midnight. Took a lot of help from Airflow docs and since we use Airflow internally in our services, I had a fair idea of what to build. Wrote a couple of unit tests and sent the solution by 2 AM.
The review round was then scheduled for 9th January. The interviewer first discussed one of my projects in depth and then went through my code with a fine tooth comb. There were one or two minor bugs here and there but overall he seemed satisfied with the solution. I got a positive feedback and was moved to round 2.
This was the design round and took place on 14th January. I was asked to build a settlement system for merchants where transactions were to be settled on T+1 day after deducting commission. The merchant should be able to see their ledger for the day and also have an option for a one time settlement of a given amount per day.
I gave the approach of having WAL based ledger management for durability and supporting high write throughput. Sharding can be done basis date and on tT1 day, once there is no write traffic for that shard, async workers can take care of aggregation of data and settlement of money. For GET API, we can have a read-optimized data store like ES and also discussed about the pipelines for moving data from the primary datastore to ES. Focus was also on the data modeling part.
This round too went well and my 3rd round was scheduled.
This was the DSA round and took place on 19th January. It was for 1 hour. After a quick intro, I was asked 3 questions.
After this round was done, I felt I might be eliminated. But I got an email that I'll be having the HM round next. So I guess if you are able to solve 2 out 3 problems in this round, you are moved to the next round.
This round took place on 21st January and was of 1 hour. There were two interviewers in this round. One of them was an EM and the other was head of payments at PhonePe. The round again involved a discussion on my projects, my current team structure, standard behavioural questions. I was also asked if I'm serving notice period, my current CTC and any other offers in hand. I too asked a few questions about PhonePe's flat heirarchy and how do KPIs differ for someone with 2-3 YOE vs someone with 6-7 YOE.
2 days later, on 23rd January, I was communicated that I was selected and was asked to send over documents. The next week I had the compensation discussion call with HM. Unfortunately I had to reject their offer because of competing offer from Microsoft.
https://leetcode.com/discuss/post/7770547/phonepe-software-engineer-5-7-years-bang-6vup/