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

Software Engineer

PhonePe
upvote
share-icon
3 rounds | 6 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 2 Months
Topics: Data Structures, Pointers, OOPS, System Design, Algorithms, Dynamic Programming
Tip
Tip

Tip 1 : Good Knowledge of Time and Space Complexity
Tip 2 : Practice DSA Questions

Application process
Where: Linkedin
Eligibility: No criteria
Resume Tip
Resume tip

Tip 1 : Have some projects on your resume.
Tip 2 : Do not put false things on your resume.

Interview rounds

01
Round
Medium
Online Coding Test
Duration90 Minutes
Interview date22 Jan 2022
Coding problem2

Timing - It was an online assessment, and can be given at any time based on your convenience in under 1 week's time.
Environment - CodeSignal provides indentation and hints for keywords in any language you choose like C, C++ , Java

1. Circular Permutation In Binary Representation

Moderate
25m average time
75% success
0/80
Asked in companies
WalmartPhonePe

You are given the two integers 'N' and 'X'. Your task is to find an array 'P' such that:

'P' is a permutation of (0, 1, 2, ..., 2 ^ (N  - 1)).

The first element of the array 'P' is 'X', i.e., P[0] = X.

Adjacent elements of 'P' (i.e., P[i] and P[i + 1]) differ by only 1 bit in their binary representation.

The first and the last element (i.e., P[0] and P[2^N -1]) are also considered as adjacent elements.
Note:
For N = 2, [0,1,2,3], [0,2,3,1], [1,2,3,0] are some of the valid permutations but [0,0,1,2], [1,2,3,4], [1,1,1,3] are not.

It is guaranteed that an array 'P' always exits with the given requirements.
Problem approach

Key idea that paused me initially - digits/numbers are not actually concatenated as strings, it must be exact match between array element and pieces element. E.g. we cannot do [2, 32, 15] to [23, 215]. When I realized it solution flows naturally.

We need to be able to lookup elements of pieces quickly - hash map. We put whole array from pieces as a value, and first element of that array as a key. Because all numbers are unique it will work. When we find the match for first element then the rest of elements in pieces element should match elements from array exactly. To track elements of array we keep global index variable. If we reached the end of array that means all elements are matched from pieces.

Try solving now

2. Money In Bank

Easy
15m average time
85% success
0/40
Asked in companies
PhonePeDaffodil SoftwareD.E.Shaw

Harshit wants to save money for his first car. So, he puts money in the Ninja bank every day.

He starts by putting in ‘1’ rupee on Monday, the first day. Every day from Tuesday to Sunday, he will put in ‘1’ rupee more than the day before. On every subsequent Monday, he will put in ‘1’ rupee more than the previous Monday.

You are given an integer ‘N’, your task is to return the total amount of money he will have in the Ninja bank at the end of the ‘N’th day.

For example :

Given ‘N’ = 2 
On Day 1 = 1
On Day 2 = 2 
Total Amount = 1 + 2 = 3.
Therefore the answer is 3.
Problem approach

The question was simple just follow the instructions given in the question. In order to handle corner cases try answering questions like How do you determine if a transaction will fail? and then Simply apply the operations if the transaction is valid.

Try solving now
02
Round
Medium
Face to Face
Duration90 Minutes
Interview date2 Feb 2022
Coding problem2

The interviewer was a Senior Software Engineer at Phonepe

1. Best Time to Buy and Sell Stock

Moderate
20m average time
80% success
0/80
Asked in companies
IntuitOptumOYO

You are given an array/list 'prices' where the elements of the array represent the prices of the stock as they were yesterday and indices of the array represent minutes. Your task is to find and return the maximum profit you can make by buying and selling the stock. You can buy and sell the stock only once.

Note:

You can’t sell without buying first.
For Example:
For the given array [ 2, 100, 150, 120],
The maximum profit can be achieved by buying the stock at minute 0 when its price is Rs. 2 and selling it at minute 2 when its price is Rs. 150.
So, the output will be 148.
Problem approach

Step 1) Declare a buy variable to store the buy cost and max_profit to store the maximum profit.
Step 2) Initialize the buy variable to first element of profit array.
Step 3) Iterate over the prices array and check if the current price is miminum or not.
Step 4) If the current price is minimum then buy on this ith day.
Step 5) If the current price is greater then previous buy then make profit from it and maximise the max_profit.
Step 6) Finally return the max_profit.

Try solving now

2. Search In A 2D Matrix

Easy
0/40
Asked in companies
PhonePeSamsung

You are given a 2-D matrix with 'N' rows and 'M' columns, each row of the matrix is sorted in non-decreasing order and the first element of each row is greater than or equal to the last element of the previous row. You are also given an integer ‘X’, you are supposed to find whether 'X' is present in the given matrix or not.

Problem approach

Step 1) Let the given element be x, create two variable i = 0, j = n-1 as index of row and column
Step 2) Run a loop until i = n
Step 3) Check if the current element is greater than x then decrease the count of j. Exclude the current column.
Step 4) Check if the current element is less than x then increase the count of i. Exclude the current row.
Step 5) If the element is equal, then print the position and end.

Try solving now
03
Round
Hard
Video Call
Duration90 Minutes
Interview date4 Feb 2022
Coding problem2

The interviewer was Head of Engineering at Phonepe

1. System Design Question

Designing e-commerce websites like Flipkart or Amazon

Problem approach

Tip 1 : Ask clarifying questions
Tip 2 : Be thorough
Tip 3 : clearly define the who and the what of your solution

2. OS Questions

What is a Thread?
What are the differences between process and thread?
What is Thrashing?

Problem approach

Tip 1 : Read Galvin for OS thoroughly.

Here's your problem of the day

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

Skill covered: Programming

What is recursion?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
4 rounds | 7 problems
Interviewed by PhonePe
2996 views
0 comments
0 upvotes
company logo
Software Engineer
3 rounds | 4 problems
Interviewed by PhonePe
4916 views
0 comments
0 upvotes
company logo
Software Engineer
3 rounds | 7 problems
Interviewed by PhonePe
2415 views
0 comments
0 upvotes
company logo
Software Engineer
3 rounds | 5 problems
Interviewed by PhonePe
4964 views
1 comments
0 upvotes
Companies with similar interview experiences
company logo
Software Engineer
3 rounds | 7 problems
Interviewed by Optum
7873 views
1 comments
0 upvotes
company logo
Software Engineer
5 rounds | 5 problems
Interviewed by Microsoft
9973 views
1 comments
0 upvotes
company logo
Software Engineer
2 rounds | 4 problems
Interviewed by Amazon
4310 views
1 comments
0 upvotes