How I Got the Interview Opportunity? 🎯
PhonePe is one of the top companies visiting our Campus and is famous for asking good-level DSA questions.
After we registered for PhonePe, we got the link to Online Test, which was the first step of the process.
🖥️ Online Assessment Round
The duration of the test was 2 hours. There were 4 Coding Questions with Medium-Hard difficulty level.
Problems Asked:
-
Count ways to exit matrix [N][M] (4 adjacent directions movements) from given (Sx, Sy) starting point in at most K steps.
→ Solvable in O(N * M * K) using DP -
You can increment any A[i] by 1 (at most K times), find the maximum frequency of any A[i] possible.
→ Available on LeetCode. Solvable in O(N log N)
→ Approach: Sort Array. Fix L, find best R using binary search (prefix sums required). -
Game Theory Problem: Given A and C, start with value A! (A factorial). Each player removes B (B ≤ A!) and B should have at most C distinct prime factors.
- A, C ≤ 10^6
- Answer: Count unique factors of A! If it is ≤ C, first wins else second wins
-
A Hard problem on Tree (not understandable, and no one solved it).
Only 9 students (including me) from the whole college who appeared for the test were selected for the next Interview Rounds.
🔹 First Technical Interview Round (1 Hour Long)
📍 Difficulty Level: Easy-Medium
📍 Interviewer: SDE-1 at PhonePe (1.5 years of experience)
He then asked about my Hackerearth Internship and how to set problems, generate test cases, and automate them.
DSA Questions Asked:
-
Find the missing number in a sorted array of size N-1 (consisting of all numbers from 1 to N).
- My Solution: Expected O(log N) → Binary Search ✅ (Very Easy Problem)
-
Pick K elements from either the start or end of the array such that their sum is maximum.
- My Solution: Iterate on count of prefix elements from 0 to K and take suffix elements accordingly.
- Expected Time Complexity: O(N) ✅ (Easy Problem)
-
Query Problem: Given an array of integers, answer queries of type L R D — Count numbers from L to R where the number of digits in that number ≥ D.
- My Solution: O(N log N) precomputation & O(1) query. Used 2D prefix sum array. ✅ (Medium Problem)
🔹 Second Technical Interview Round (1 Hour Long)
📍 Interviewer: 3+ years of experience at PhonePe
-
Covid Spread in a Binary Tree
- Given a Binary Tree where nodes are people, the deepest leaf node gets Covid+ first, and the virus spreads to neighboring nodes in 1 sec. Find total time to spread in the whole tree.
- My Solution: The answer is the Diameter of the Binary Tree (one of the farthest nodes is the first Covid+ node).
- Time Complexity: O(N) ✅
-
Evaluate a mathematical expression containing brackets, operators, and numbers.
- My Solution: Used Two Stacks (one for operands & brackets, one for numbers).
- Time Complexity: O(N) ✅
🔹 Third HR Interview Round (1 Hour Long)
📍 Interviewer: Head of a Department at PhonePe
Questions Asked:
-
Internships Discussion:
- Hackerearth: What topics do you usually set problems on?
- Vicevio (Flutter Internship): How did you improve the architecture & contributions?
-
Have you developed any Android App that solved a daily life problem?
🎉 Result: I GOT SELECTED! 🎉
This was a dream come true for me as I had been aiming for PhonePe since my first year.
Getting placed on the first day of the Placement Season made it even more special.
🔥 Some Tips:
- OA Round was Hard 💻 but Interview Rounds were Easy-Medium (mostly Leetcode-style questions).
- Keep interacting with the Interviewer instead of staying silent while thinking.
- Explain easy problems well—most candidates will solve them, but good explanation can make a difference.
- If you don’t know an answer, admit it early rather than diving in blindly.