PhonePe interview experience Real time questions & tips from candidates to crack your interview

SDE - 1

PhonePe
upvote
share-icon
3 rounds | 4 Coding problems

Interview preparation journey

expand-icon
Journey
My journey began with a curiosity to explore technology and a determination to master it. I started with the basics, focusing on building a strong foundation in programming and data structures. Over time, I delved into projects, such as developing an e-commerce platform and an ed-tech solution, which allowed me to apply my learning practically. Balancing my academics with internships at companies like Spyne and AlgoTutor, I gained real-world experience in full-stack development, API integration, and scalable systems. Mentoring and teaching during my stint at Internshala further honed my skills and reinforced my understanding. While preparing for interviews, I dedicated myself to solving complex DSA problems, optimizing code, and refining my projects to showcase in interviews. The process wasn’t easy, but consistency and a growth mindset kept me going. Each step contributed to where I am today, and I believe persistence is key to achieving any goal.
Application story
I applied for this opportunity through an employee referral after actively exploring openings and reaching out to connections in my network. Fortunately, one of my acquaintances referred me internally, which helped my application get noticed more quickly. After the referral, I was contacted by the recruitment team, and the process proceeded smoothly. I received updates about the interview schedule, and everything was coordinated professionally until the final interview.
Why selected/rejected for the role?
I was selected and received the offer letter from HR, but eventually decided not to move forward due to a more competitive offer.
Preparation
Duration: 3 months
Topics: Data Structures, Algorithms, OOP, System Design, DBMS, SQL, Low-Level Design, Dynamic Programming, Recursion, Problem Solving
Tip
Tip

Tip 1: Must-Solve DSA (FAANG LEVEL DSA).
Tip 2: Resume from Top to Bottom.
Tip 3: Detailed Projects.

Application process
Where: Campus
Eligibility: NA, (Salary Package - 19 LPA)
Resume Tip
Resume tip

Tip 1: DSA Coding Challenges
Tip 2: Impactful Experience

Interview rounds

01
Round
Hard
Video Call
Duration60 minutes
Interview date14 Feb 2025
Coding problem2

The interview was scheduled for the evening, around 5–6 PM. There were two people on the panel—one was actively conducting the interview, while the other was mostly shadowing the process. The main interviewer was an SDE-2 at PhonePe. The round began with a brief introduction and an overview of what to expect during the session. It was planned to last an hour and included two DSA questions. One required writing complete code along with test cases and executing it successfully. The second problem involved writing pseudocode and clearly explaining the approach.

1. Most Stones Removed with Same Row or Column

Hard
45m average time
55% success
0/120
Asked in companies
SamsungAmazonPhonePe

On a 2-D plane, we place 'n' stones at some integer coordinate points. Each coordinate point may have at most one stone.


A stone can be removed if it shares either the same row or the same column as another stone that has not been removed.


You are given an array 'stones' of length 'n' where 'stones[i]' = '[ri, ci]' represent the ith stone’s location i.e 'ri' is the row coordinate of the 'ith' stone and 'ci' is the column coordinate of the 'ith' stone. Your task is to return the largest possible number of stones that can be removed.


Example:
Input: 'stones' = [[0,1] [1,0] [0,0]]

Output: 2

Explanation:
We can remove the 1st stone at [0,1] as it has the same row as the 3rd stone [0, 0]. And remove the 2nd stone because it has the same column [0,1] as the 3rd stone.


Problem approach

Uses DisJoint Set Union to Solve it.
Algorithm
Main method removeStones:

Set n as the length of the input array stones.
Create an instance of the UnionFind class uf with a size of 20002 to handle the coordinate range.
Loop through each stone i in stones:
Call uf.union() to union the x-coordinate (stones[i][0]) and the y-coordinate offset by 10001 (stones[i][1] + 10001).
Return n - uf.componentCount as our result.

Try solving now

2. Check Array Pattern

Moderate
0/80
Asked in company
PhonePe

You are given an array 'A' of length 'N' containing integers.


Determine if there exist three indices 'i', 'j', and 'k' such that 0 <= 'i' < 'j' < 'k' < 'N' and 'A[i]' < 'A[k]' < 'A[j]'.


For Example :
Let 'N' = 5, 'A' = [1, 5, 2, 4, 3].
Here, if we take 'i' = 0, 'j' = 1, and 'k' = 3, then 'i' < 'j' < 'k' (0 < 1 < 3) and 'A[i]' < 'A[k]' < 'A[j]' (1 < 4 < 5).
Therefore, the answer is True.
Problem approach

The simplest solution is to consider every triplet (i, j, k) and check if the corresponding numbers satisfy the 132 criteria. If any such triplet is found, we can return True. If no such triplet is found, we need to return False.

Time Complexity: O(n^3).

The interviewer asked me to optimize this and gave me a hint to use a stack.

Try solving now
02
Round
Medium
Video Call
Duration60 minutes
Interview date19 Feb 2025
Coding problem2

Almost the same as Round 1 for this.

The interview was scheduled in the evening, around 5–6 PM. There were two people on the panel—one interviewer was actively conducting the interview, while the other was mostly shadowing the process. The interviewer was working as an SDE-2 at PhonePe. The round began with a brief introduction and a quick overview of what to expect from the session. It was planned for an hour and included two DSA questions. One of them required writing complete code along with test cases and executing it successfully. The second problem involved writing pseudocode and clearly explaining the approach.

1. Simultaneous Production

Easy
0/40
Asked in company
PhonePe

You are given the number of machines 'N', an array 'M' of length 'N' where 'M[i]' represents the number of days the i-th machine takes to produce one item, and the total number of items 'O' that need to be ordered.


Return the minimum number of days required for all machines working in parallel to complete the order.


For Example :
Let 'N' = 2, 'M' = [3, 1], 'O' = 5.
Day 1: Machine 2 produces an item
Day 2: Machine 2 produces an item
Day 3: Both Machine 1 and Machine 2 produce an item
Day 4: Machine 2 produces an item
Total items produced = 1 + 1 + 2 + 1 = 5 items.
Therefore, the answer is 4 days.
Problem approach

Can be solved using Binary Search
Approach
1. Sort the machines in ascending order of their production times.
2. Initialize left and right pointers for binary search.
3. While the left pointer is less than or equal to the right pointer:
Calculate the mid-value.
Determine how many items each machine can produce in mid days.
Sum up the total production from all machines.
Update left or right pointers based on the total production.

Try solving now

2. Friends Pairing Problem

Easy
10m average time
90% success
0/40
Asked in companies
Goldman SachsPayPalHCL Technologies

You are given an integer ‘N’, which denotes there are ‘N’ friends. You are supposed to form some pairs them satisfying the following conditions:

1. Each friend can be paired with some other friend or remain single.

2. Each friend can be a part of at most one pair.

You are supposed to find the total number of ways in which the pairing can be done satisfying both conditions. Since the number of ways can be quite large, you should find the answer modulo 1000000007(10^9+7).

Note:
1. Return the final answer by doing a mod with 10^9 + 7.
2. Pairs {A, B} and {B, A} are considered the same.
Problem approach

For n-th person there are two choices:
1) n-th person remains single, we recur for f(n – 1).
2) n-th person pairs up with any of the remaining n – 1 persons. We get (n – 1) * f(n – 2).
Therefore we can recursively write f(n) as: f(n) = f(n – 1) + (n – 1) * f(n – 2).
We can simply form the recursive function for it with base case if n<=2 then f(n) = n as f(1)=1 and f(2)=2.

Try solving now
03
Round
Easy
Video Call
Duration45 minutes
Interview date25 Feb 2025
Coding problem0

This round was conducted with the Hiring Manager, who was working as an Engineering Manager at PhonePe with over 7 years of experience. He came across as a very humble and approachable person. After a brief and formal introduction, he started by explaining the context and objective of the interview. The focus of this round was primarily to understand my past work experience, my expectations from the role and organization, and to share insights into what the company is looking for in a candidate. It was a blend of a culture fitment and team alignment round, aimed at ensuring mutual compatibility in terms of work style, values, and expectations.

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

Which traversal uses a queue as its primary data structure?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
4 rounds | 6 problems
Interviewed by PhonePe
2914 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 7 problems
Interviewed by PhonePe
2367 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 5 problems
Interviewed by PhonePe
0 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 6 problems
Interviewed by PhonePe
1724 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
110395 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
54211 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
33221 views
6 comments
0 upvotes