phonepe logo

Phonepe Interviews

33 experiences586 reads169 questions24% success rate
My Interview Journey: Rejections, Grind, and an Unexpected Tier-1 Offer
phonepe logo
Phonepe
SDE IOffer
December 11, 202538 reads

Summary

After a series of rejections and unexpected turns, I secured an offer from PhonePe after initially giving up on tier-1 companies. The journey included interviews with Google, Amazon, and JPMC, with a surprising offer from PhonePe after months of silence.

Full Experience

Before the final offer came, my journey wasn’t smooth. I had a few rejections, some interviews that went nowhere, and months of silence from companies I really wanted to join. I had kept my target list small: only a handful of tier-1 companies. For practice, I gave interviews at 2-3 service-based firms. Meanwhile, I was preparing consistently -

- Followed LeetCode 75 + 150,
- Completed a Udemy DSA course to build fundamentals,
- Read interview experiences from LeetCode + Google’s real-world interview blogs,
- And even got the chance to interview with Google and Amazon during this phase.

JPMC - Where It Started

I had applied to multiple positions on JPMC’s portal without any response. Then suddenly, in early June, I received the online assessment. The questions were easy - medium and I cleared all test cases, so I was hopeful… but HR never responded, even after multiple follow-ups. At that point, I thought it was over.

PhonePe - The Unexpected Turn

I initially applied for the SDE role, but it didn’t move. So I applied for the PSE role, and surprisingly got a call the very next day.

Round 1 - Technical
- One LeetCode medium coding question → solved
- Linux scripting + commands
- SQL queries (missed one complex one initially, but solved it after the interviewer reframed it)

Round 2 - Hiring Manager
- Deep dive into my TCS project work
- A few SQL queries again

End of August, I got the offer. The package wasn’t high, but PhonePe > TCS on my resume, and I wanted to move. I accepted and resigned. At this point, I had mentally closed the chapter on all tier-1 hopes.

Then… JPMC Called Back

After months of silence, in mid-September, I suddenly received a call:
“We’re moving forward with your application.” I honestly didn’t believe something would come out of it. But then the Super Day was scheduled - 3 rounds back-to-back (45 mins each + 15 min break).

Round 1 - Technical Debugging + Coding
- Given ~100 lines of code and asked to find bugs
- Apart from all technical bugs, I found a logical bug too, which the interviewer appreciated
- Then a sorting + pattern-maintenance problem with numeric array - completed ~80% before time ran out(nearly 1 hour long)

Round 2 — System Design
A very standard, commonly-practiced system design question. (Everyone who has done SD prep has seen this one.)

Round 3 — Techno-Managerial
More technical than managerial - framework choices, scenario-based problem solving, and reasoning.

After 1–2 days, I got the call:
I cleared the Super Day.

Then came team matches - I had two. Matched with the second team.

And finally… the offer rolled out.

Interview Questions (2)

Q1
Find Logical Bug in Code
Data Structures & Algorithms

Given ~100 lines of code, the candidate was asked to find bugs. Apart from all technical bugs, a logical bug was identified which the interviewer appreciated.

Q2
Sorting with Pattern Maintenance
Data Structures & AlgorithmsHard

Given a numeric array, the task was to perform sorting while maintaining a specific pattern. The candidate completed approximately 80% of the problem before time ran out.

Preparation Tips

Prepared consistently by following LeetCode 75 + 150, completing a Udemy DSA course, reading interview experiences from LeetCode and Google's blogs, and interviewing with Google and Amazon during the process.

PhonePe || SE (1-3Y) || Interview Experience
phonepe logo
Phonepe
SEOffer
October 19, 202549 reads

Summary

I recently interviewed for a Software Engineer position at PhonePe, which involved an Online Assessment, two technical coding rounds, and a final Hiring Manager discussion. I successfully received an offer for the role.

Full Experience

My interview journey at PhonePe for the Software Engineer role, with 1-3 years of experience, began after I applied through Instahyre.

Round 0 – Online Assessment

The initial stage was an online coding assessment conducted on CodeSignal. This round comprised four Data Structures and Algorithms questions, ranging from medium to hard difficulty levels.

Round 1 – Coding Round

Approximately one week after completing the OA, I received an email from HR to schedule the first coding round. I requested to postpone it by two weeks as I was out of town. In this round, I was presented with the following problem:

We thoroughly discussed multiple approaches to solve this problem. Due to time constraints, this was the only question covered in this round.

Round 2 – Coding Round

The very next day, I received a call from HR and scheduled the second coding round for the same week. This round involved two specific questions:

  1. Accounts Merge
  2. A variation of the Meeting Rooms problem, specifically focused on finding the minimum number of meeting rooms required.

Round 3 – HM Round

Again, HR contacted me the day after the second coding round, and I scheduled the Hiring Manager round for the following week. This round primarily involved a discussion about my resume and my work experience at my current company. I was asked technical and architectural questions related to my current projects. Additionally, the interviewer posed a few behavioral and situational questions to understand my approach to various workplace scenarios.

Verdict: I was selected for the position.

Interview Questions (4)

Q1
Min Stack
Data Structures & AlgorithmsMedium

Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.

Q2
Accounts Merge
Data Structures & AlgorithmsMedium

Given a list of accounts where each account consists of a name followed by some email addresses, merge these accounts. Two accounts belong to the same person if they have some email common. Note that even if two accounts have the same name, they may belong to different people as people could have the same name. A person can have any number of accounts initially, but all of their accounts have the same name.

Q3
Meeting Rooms II Variation (Find Minimum Meeting Rooms)
Data Structures & AlgorithmsMedium

Given an array of meeting time intervals intervals where intervals[i] = [starti, endi], return the minimum number of conference rooms required.

Q4
Behavioral and Situational Questions
Behavioral

The interview included general behavioral and situational questions designed to assess problem-solving skills, teamwork, handling conflict, and career aspirations.

PhonePe Prep
phonepe logo
Phonepe
October 1, 202565 reads

Summary

This post summarizes my interview experience at PhonePe, detailing the various Data Structures & Algorithms and System Design questions I encountered across multiple technical rounds.

Full Experience

My interview journey at PhonePe involved several intense rounds, primarily focusing on Data Structures & Algorithms (DSA) and System Design.

DSA Rounds

The DSA rounds were comprehensive, covering a wide array of topics. I was presented with problems such as "Burning Tree" and "Shortest Path to Get All Keys". I also tackled LeetCode 1235: Maximum Profit in Job Scheduling and 1657: Determine if Two Strings Are Close. During Matchsticks to Square, I initially struggled due to misinterpreting the input format, but once I understood, my approach was satisfactory to the interviewer. For Kth Smallest Element in a Sorted Matrix, I started with a min-heap solution, and after a hint, optimized it using binary search.

Other notable DSA problems included Burst Balloons (a hard DP problem) and The Celebrity Problem. In a subsequent PS/DS round, I was asked to solve Remove K Digits and a problem from Codeforces. I also faced a custom question: "Find the minimum number of swaps to make a string palindrome", for which I used a greedy approach. Another question involved finding "the sum of all nodes at the deepest level in a binary tree".

I encountered a complex problem on maximizing total damage with spell casting, where I had to consider sliding window or dynamic programming, and removing the most stones in the same row or column, which required graph theory and Union-Find. Classic problems like Trapping Rain Water, Left View of a Binary Tree, and finding nodes at 'k' distance from a target node were also asked. I implemented a Min Stack and was tasked with printing the level order traversal of a tree with alternate direction changes, which I solved easily. Another monotonic stack problem was given, and despite modifications, I managed to solve the first two versions.

Additional problems included First Missing Positive, Longest Increasing Path in a Matrix, and an O(log n) optimization challenge for the Complete Binary Tree Inserter (which I could only solve in O(n)). Queue Reconstruction by Height, House Robber III, Kth Ancestor of a Tree Node, and Bricks Falling When Hit were also part of the technical assessments. I was also asked a question related to the Convex Hull Algorithm and how to generate random points within a circle with equal probability distribution.

System Design Rounds

The System Design rounds were equally challenging. I was asked to design a Search Autocomplete feature, where I successfully implemented a Trie-based solution and discussed scalability and optimizations. One of the final rounds was to design Instagram, where I focused on posting, immediate visibility, feed generation, and likes/comments. I covered NFRs, scale, HLD, and trade-offs, though I felt I could have elaborated more on the likes/comments service. I also had to design a service for delayed triggers, a generic online game (like Ludo/Chess) where I had to drive the discussion from FNRs to tech stack and matching logic, and Payment Gateway Integration. Another iteration of Design Instagram highlighted the interviewer's disagreement with a message queue for feed publishing/fetching at massive scale. Lastly, I designed Twitter, covering tweet posting, follow-following, timelines, and profiles, emphasizing LLD and HLD aspects.

Interview Questions (62)

Q1
Burning Tree
Data Structures & AlgorithmsMedium

Find the minimum time taken to burn the entire binary tree starting from a given target node.

Q2
Shortest Path to Get All Keys
Data Structures & AlgorithmsHard

Given a 2D grid consisting of walls, empty cells, the starting point, keys, and locks. Return the shortest path to get all keys.

Q3
Maximum Profit in Job Scheduling
Data Structures & AlgorithmsHard

Given n jobs where startTime[i], endTime[i], and profit[i] are the start time, end time, and profit of the i-th job, return the maximum profit you can achieve by scheduling jobs such that no two jobs overlap.

Q4
Determine if Two Strings Are Close
Data Structures & AlgorithmsMedium

Two strings are considered 'close' if you can attain one from the other using two types of operations: 1. Swap any two existing characters. 2. Transform every occurrence of one existing character into another existing character, and vice versa. Return true if they are close, false otherwise.

Q5
Matchsticks to Square
Data Structures & AlgorithmsMedium

You are given an integer array matchsticks where matchsticks[i] is the length of the i-th matchstick. You want to use all the matchsticks to form one square. You should not break any single matchstick, but you can link them up, and each matchstick must be used exactly one time. Return true if you can make this square, and false otherwise.

Q6
Kth Smallest Element in a Sorted Matrix
Data Structures & AlgorithmsMedium

Given an n x n matrix where each of the rows and columns is sorted in ascending order, return the k-th smallest element in the matrix.

Q7
Burst Balloons
Data Structures & AlgorithmsHard

You are given n balloons, indexed from 0 to n - 1. Each balloon is painted with a number on it. If you burst balloon i, you will get nums[left] * nums[i] * nums[right] coins. Your goal is to burst all the balloons to get the maximum coins. Assume nums[-1] = nums[n] = 1.

Q8
The Celebrity Problem
Data Structures & AlgorithmsMedium

In a group of N people, a celebrity is someone who is known by everyone else but does not know anyone. Find the celebrity if one exists.

Q9
Remove K Digits
Data Structures & AlgorithmsMedium

Given a non-negative integer num represented as a string, remove k digits from the number so that the new number is the smallest possible.

Q10
Codeforces 1037/D - Build Permutation (BFS/DFS Traversal)
Data Structures & Algorithms

Problem statement from Codeforces problem 1037/D, related to tree traversals.

Q11
Minimum Swaps to Make String Palindrome
Data Structures & AlgorithmsMedium

Given a string, find the minimum number of swaps required to make it a palindrome.

Q12
Sum of Nodes at Deepest Level in Binary Tree
Data Structures & AlgorithmsMedium

Given a binary tree, find the sum of all nodes at the deepest level.

Q13
Maximize Total Damage with Spell Casting
Data Structures & Algorithms

A problem about maximizing total damage with spell casting. I had to devise a strategy, possibly using sliding window or dynamic programming, to balance choices and constraints.

Q14
Remove Most Stones with Same Row or Column
Data Structures & AlgorithmsMedium

You are given an array of stones where stones[i] = [ri, ci] represents the location of a stone on a 2D plane. You can remove a stone if and only if it shares the same row or column as another stone that has not been removed. Return the maximum number of stones that you can remove.

Q15
Trapping Rain Water
Data Structures & AlgorithmsHard

Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it can trap after raining.

Q16
Left View of a Binary Tree
Data Structures & AlgorithmsMedium

Given a binary tree, print the nodes in 'left view' order (first node at each level from the left side).

Q17
Nodes at K Distance from Target in Binary Tree
Data Structures & AlgorithmsMedium

Given the root of a binary tree, the value of a target node, and an integer k, return an array of the values of all nodes that have a distance k from the target node.

Q18
Min Stack
Data Structures & AlgorithmsMedium

Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.

Q19
Binary Tree Zigzag Level Order Traversal
Data Structures & AlgorithmsMedium

Given the root of a binary tree, return the zigzag level order traversal of its nodes' values. (i.e., from left to right, then right to left for the next level and alternate between).

Q20
Monotonic Stack Problem with Modifications
Data Structures & Algorithms

A problem solvable using a monotonic stack. The interviewer modified the question multiple times during the interview. I solved the initial problem and its first modification.

Q21
First Missing Positive
Data Structures & AlgorithmsHard

Given an unsorted integer array nums, return the smallest missing positive integer.

Q22
Longest Increasing Path in a Matrix
Data Structures & AlgorithmsHard

Given an m x n integers matrix, return the length of the longest increasing path in the matrix. From each cell, you can either move in four directions: left, right, up, or down. You may not move diagonally or move outside the boundary (i.e., no wrap-around is allowed).

Q23
Complete Binary Tree Inserter
Data Structures & AlgorithmsMedium

Implement the CBTInserter class. The question specifically asked for an O(log n) solution for insertion, though I could only achieve O(n).

Q24
Queue Reconstruction by Height
Data Structures & AlgorithmsMedium

You are given an array of people, people, as people[i] = [hi, ki]. hi is the height of the i-th person, and ki is the number of people in front of the i-th person who have a height greater than or equal to hi. Reconstruct the queue.

Q25
House Robber III
Data Structures & AlgorithmsMedium

The thief has found himself a new place for his thievery again. There is only one entrance to this area, called root. Besides the root, each house has one and only one parent house. After a tour, the smart thief realized that all houses in this place form a binary tree. It will automatically contact the police if two directly-linked houses were robbed on the same night. Determine the maximum amount of money the thief can rob tonight without alerting the police.

Q26
Kth Ancestor of a Tree Node
Data Structures & AlgorithmsHard

Given a tree with n nodes labeled from 0 to n - 1, and parent[i] denotes the parent of i-th node. Find the k-th ancestor of a given node.

Q27
Bricks Falling When Hit
Data Structures & AlgorithmsHard

You are given an m x n grid representing a map of bricks. A brick is at grid[i][j] = 1 and an empty cell is at grid[i][j] = 0. You are also given an array hits, where hits[i] = [rowi, coli] indicates a brick (if exists) at that position is removed. We need to find the number of bricks that will fall after each hit.

Q28
Convex Hull Algorithm
Data Structures & AlgorithmsHard

A problem related to finding the convex hull of a set of points.

Q29
Generate Random Points in Circle with Equal Probability
OtherMedium

Write a function that generates random points within a circle with equal probability distribution.

Q30
Search in Rotated Sorted Array
Data Structures & AlgorithmsMedium

There is an integer array nums sorted in ascending order (with distinct values). Prior to being passed to your function, nums is possibly rotated at an unknown pivot index k. Given the array nums after the rotation and an integer target, return the index of target if it is in nums, or -1 otherwise.

Q31
Binary Tree Maximum Path Sum
Data Structures & AlgorithmsHard

A path in a binary tree is a sequence of nodes where each pair of adjacent nodes in the sequence has an edge connecting them. A node can only appear in the sequence at most once. The path does not necessarily need to pass through the root. The path sum is the sum of the node's values in the path. Given the root of a binary tree, return the maximum path sum of any non-empty path.

Q32
Max Integers to Add Without Negative Sum
Data Structures & AlgorithmsMedium

Given an array of integers, count the maximum number of integers you can add such that at any point, the cumulative sum from left to right never goes negative. The question was presented in a scenario.

Q33
Sum of Distances in Tree
Data Structures & AlgorithmsHard

There is an undirected connected tree with n nodes labeled from 0 to n - 1 and n - 1 edges. You are given an array edges of length n - 1, where edges[i] = [ai, bi] indicates that there is an edge between nodes ai and bi. Return an array answer of length n where answer[i] is the sum of the distances between node i and all other nodes in the tree.

Q34
Rotting Oranges
Data Structures & AlgorithmsMedium

You are given an m x n grid where each cell can have one of three values: 0 representing an empty cell, 1 representing a fresh orange, or 2 representing a rotten orange. Every minute, any fresh orange that is 4-directionally adjacent to a rotten orange becomes rotten. Return the minimum number of minutes that must elapse until no fresh oranges remain. If this is impossible, return -1.

Q35
Greedy Meeting Schedule Problem
Data Structures & AlgorithmsMedium

A greedy problem similar to typical meeting scheduling or interval problems.

Q36
Monotonic Stack (Next Greater Element variant)
Data Structures & AlgorithmsMedium

A problem that can be solved using a monotonic stack, similar to finding the next greater element.

Q37
Shortest Path in a Grid with Obstacles Elimination
Data Structures & AlgorithmsHard

You are given an m x n integer matrix grid where grid[i][j] is either 0 (empty) or 1 (obstacle). You can move up, down, left, or right. You are also given an integer k. Return the minimum number of steps to walk from (0, 0) to (m - 1, n - 1) given that you can eliminate at most k obstacles. If it is impossible to find such a path, return -1.

Q38
Maximum Sum BST in Binary Tree
Data Structures & AlgorithmsHard

Given a root of a binary tree, return the maximum sum of all nodes in any BST (Binary Search Tree) subtree.

Q39
Find the Kth Smallest Sum of a Matrix With Sorted Rows
Data Structures & AlgorithmsHard

Given an m x n matrix mat where each row is sorted in non-decreasing order, and an integer k, return the k-th smallest sum among all possible arrays that you can form by choosing exactly one element from each row.

Q40
Number of Islands
Data Structures & AlgorithmsMedium

Given an m x n 2D binary grid which represents a map of '1's (land) and '0's (water), return the number of islands.

Q41
Diameter of Binary Tree
Data Structures & AlgorithmsEasy

Given the root of a binary tree, return the length of the diameter of the tree. The diameter of a binary tree is the length of the longest path between any two nodes in a tree. This path may or may not pass through the root.

Q42
Range Sum Query 2D - Immutable
Data Structures & AlgorithmsMedium

Given a 2D matrix matrix, handle multiple queries of the following type: Calculate the sum of the elements inside the rectangle defined by its upper left corner (row1, col1) and lower right corner (row2, col2).

Q43
Count Ways to Build Good Strings
Data Structures & AlgorithmsMedium

Given integers low, high, zero, and one. Return the number of 'good' strings, which are binary strings whose length is between low and high (inclusive) and contain zero consecutive '0's and one consecutive '1's.

Q44
Binary Tree Cameras
Data Structures & AlgorithmsHard

You are given the root of a binary tree. We install cameras on some nodes of the tree. Each camera at a node can monitor itself, its parent, and its immediate children. Return the minimum number of cameras needed to monitor all nodes of the tree.

Q45
Escape the Spreading Fire
Data Structures & AlgorithmsHard

You are given a 0-indexed m x n grid of integers fire. You are in a cell (0, 0) and a fire starts at a cell (fireRow, fireCol). You want to reach a safe cell (m - 1, n - 1) before the fire reaches it. Return the maximum time t you can wait before starting your journey, such that you can still reach the safe cell. If it is impossible to ever reach the safe cell, return -1. If you can always reach the safe cell regardless of how long you wait, return 10^9.

Q46
Daily Temperatures
Data Structures & AlgorithmsMedium

Given an array of integers temperatures represents the daily temperatures, return an array answer such that answer[i] is the number of days you have to wait after the i-th day to get a warmer temperature. If there is no future day for which this is possible, keep answer[i] == 0 instead.

Q47
Longest Increasing Subsequence
Data Structures & AlgorithmsMedium

Given an integer array nums, return the length of the longest strictly increasing subsequence.

Q48
Minimum Path Cost in a Grid
Data Structures & AlgorithmsMedium

You are given an m x n integer grid grid. You are also given an m x n integer matrix moveCost where moveCost[r][c] is the cost to move from a cell (r, c) to any cell in the next row column c'.

Q49
Simple Bank System
Data Structures & AlgorithmsMedium

Implement a bank system with operations like transfer, deposit, and withdraw. This is a design problem often involving handling multiple accounts and transactions.

Q50
Decoded String at Index
Data Structures & AlgorithmsMedium

You are given an encoded string s and an integer k. To decode the string, this is how it works: if the character is a digit d, the encoded string is repeated d - 1 times. Return the k-th character of the decoded string.

Q51
Check Array Formation Through Concatenation
Data Structures & AlgorithmsEasy

You are given an array of distinct integers arr and an array of integer arrays pieces, where the integers in pieces are also distinct. Return true if arr can be formed by concatenating the arrays in pieces in any order.

Q52
Frog Jump
Data Structures & AlgorithmsHard

A frog is trying to cross a river. The river is divided into some number of units, and at each unit, there may or may not be a stone. The frog can only jump on stones. Given a list of stone positions (in units) in sorted ascending order, determine if the frog can reach the last stone.

Q53
Where Will the Ball Fall
Data Structures & AlgorithmsMedium

You have a 2-D grid of size m x n representing a box with some slanted walls. A ball will drop from the top of the box. The grid grid[i][j] can be 1 (representing a right-slanted wall) or -1 (representing a left-slanted wall). Return an array answer of size n where answer[i] is the column that the ball falls out of at the bottom, or -1 if it gets stuck.

Q54
Hackerrank - Down to Zero II
Data Structures & Algorithms

You are given an integer N. In one move, you can either decrease N by 1 or decrease N to one of its divisors. Find the minimum number of moves to reach 0.

Q55
Transform String by Character Conversion
Data Structures & AlgorithmsHard

Given two strings str1 and str2 of the same length, determine whether you can transform str1 into str2 by doing zero or more conversions. In one conversion you can convert all occurrences of one character in str1 to any other lowercase English character.

Q56
IPO
Data Structures & AlgorithmsHard

Suppose LeetCode will start n projects for you. For each project i, you can choose to start it if you have at least capital[i] capital, and you'll earn profit[i] profit. You are given k projects to perform and your initial capital w. Maximize your final capital.

Q57
Design Search Autocomplete Feature
System Design

Design a search autocomplete feature. I used a Trie data structure and implemented a working solution. The discussion covered scalability, handling different scenarios, and optimization of memory and time complexity.

Q58
Design Instagram
System Design

Design Instagram, focusing on core features like posting content, immediate post visibility, feed generation, and likes/comments. I covered non-functional requirements, set scale expectations, and outlined a high-level design, detailing each service and its trade-offs.

Q59
Design Delayed Trigger Service
System Design

Design a service that registers triggers with specified delays from other services and sends a response once the delay for that trigger is completed.

Q60
Design an Online Game (e.g., Ludo/Chess/SnakeNladder)
System Design

Design an online multiplayer game like Ludo or Chess. I had to lead the discussion, covering functional and non-functional requirements, high-level design, APIs, tech stack choices, implementation details, exception handling, fault tolerance, and database choices. I also explained core logic for features like player matching (e.g., Noob vs. Noob) and presented multiple approaches with their trade-offs.

Q61
Design Payment Gateway Integration
System Design

Design a system for payment gateway integration. The interviewers were looking for very specific details in the design.

Q62
Design Twitter
System Design

Design Twitter, focusing on functionalities such as posting tweets, follow/following mechanisms, user timelines, and user profiles. The interview emphasized both Low-Level Design (LLD) and High-Level Design (HLD).

Preparation Tips

My preparation primarily involved in-depth study of Data Structures and Algorithms, practicing a wide range of LeetCode problems, and gaining a solid understanding of System Design principles. I focused on common patterns and complex problem-solving techniques relevant to both domains.

PhonePe Machine Coding Round
phonepe logo
Phonepe
September 21, 202581 reads

Summary

I recently participated in a machine coding round for PhonePe, where I was tasked with designing an 'App Version Management System' to handle app installations, updates, and various rollout strategies.

Full Experience

I had a machine coding round at PhonePe, which focused on building an 'App Version Management System'. The problem statement detailed the need to manage different app versions, handling fresh installs and updates, similar to how smartphone apps evolve. The core idea was to design a system where app owners could directly interact with target devices, bypassing traditional marketplaces like Playstore or AppStore. Key functionalities included uploading new versions, creating update patches between versions, releasing versions with strategies like beta or percentage rollouts, and checking for app version compatibility and updates. I also had to implement functions to execute install or update tasks. The expectation was to have everything in memory, focusing on OOPs/OOD principles, code readability, and testability.

Interview Questions (1)

Q1
App Version Management System Design
System DesignHard

App Version Management System

Every smartphone user these days has lots of apps installed in their smartphones. These apps follow multiple iterations in its lifecycle which can range from fresh installs to updates of an existing app.
Install is done for cases where the phone doesn't have the app previously installed. Updates are triggered when the app is preinstalled but a new feature is rolled out.
Design an app version management system for a mobile application, say PhonePe app.
We will assume that there is no marketplace like Playstore / AppStore exists and every App Owner can directly interact with the target device irrespective of operating system ( android / iOS )
To install any app, consumer can go to the website and directly install the app through online installer ( we’ll assume, this is something which is implemented )
Real world example -
  • Install - Consumer just bought his / her first Mobile device and wants to use PhonePe. In such case a fresh Install will happen - always latest version supported will be installed. Consumer goes to phonepe website and selects install option given on website ( how it happens is outside the scope of problem statement )
  • Update- Above customer has installed the app and a few days later a new feature ( say dark mode ) is rolled out by PhonePe. In such cases, PhonePe will directly update the app on the phone.

System Components -

  • App and App versions - App will have a list of versions, each version denoting a new file and metadata. Version will have some meta data associated with it, like the minimum supported operating system ( android / iOS ) version etc.
  • Roll out :: App admin can roll-out a new version from the backend. A roll-out can be either installing or updating the app -
    • install - App is to be installed fresh in the device. We will install the app in the smartphone
    • Update - takes a diff of installed version vs latest version and install the diff ( details in requirements part )
  • Rollout strategy - New version rollout can be done with different strategies.
    • Beta rollout - roll out the app version only on specific devices
    • Percentage rollout - roll out the app version on some percent on devices

Requirements-

Below are various functions that should be supported with necessary parameters passed
  • Implement the above mentioned System components and their extensions (if possible)
  • Implement the following functionalities for an app version management system. Note - We can use any of the available methods in the available capabilities section.

uploadNewVersion( // necessary params ) : Store the new version and version file byte stream in the system

createUpdatePatch( app, fromVersion, toVersion) : Create an update patch from source to target app version. Diff of fromVersion and toVersion will be a byte-stream or byte-array and same diff would be fired on the target device and pre-installed app will take care of installation. Pre Installed app has capability to accept a byte-stream / byte-array and install it as an update / patch

releaseVersion(// necessary params) : will release a version as per the strategy. BetaRolloutStartergy will include rolling out a new app version to only a set of devices.

isAppVersionSupported(// necessary params) : will check if given targetVersion supports the input device using info like like device android version, rollout strategies etc

checkForInstall(// necessary params) : Check whether a given h/w + OS supports the the app or not

checkForUpdates(// necessary params) : checks if an update is available for a given device.

executeTask(// necessary params) - will create an install or update task based on the method input. Can use methods from the list of available methods below.

Available Capabilities -

We can assume below methods are available (can decide method arguments by yourselves) -
  • installApp - will flash the app file in the device
  • updateApp - will flash the diff pack in the device
  • createDiffPack - will consume 2 app files and create diff pack file from sourceFile to targetFile
  • uploadFile(fileContent) - will upload the file in some storage and return its url.
  • getFile(fileUrl) - returns a file content, which could then be flashed using either installApp or updateApp methods

Code Expectations -

  • Everything has to be in memory.
  • Candidate can opt for any language for implementation
  • Simple and basic function are expected as entry point - no marks for providing fancy restful API or framework implementation
  • Because this is a machine coding round, try to at least complete the basic requirements with minimal required algorithm implementations.

Evaluation criteria -

  • Working code
  • Code readability
  • Implementation of OOPs / OOD principles with proper Separation of concerns
  • Testability - a TDD approach ( not to be mixed with test cases )
  • Language proficiency
  • Test Cases
  • [execution time limit] 4 seconds (sh)
  • [memory limit] 2g
PhonePe OA + Interview Experience (2025 Campus Hiring)
phonepe logo
Phonepe
Offer
August 16, 202510 reads

Summary

Recently went through PhonePe's hiring process (OA + 3 rounds) and got shortlisted. The OA had 4 questions, with the last one being a unique problem about forming numbers from a string. Technical rounds focused on problem-solving with two coding challenges in each round.

Full Experience

I recently went through the PhonePe hiring process (OA + 3 rounds) and wanted to share my experience. The OA had 4 questions, 2 from DP, 1 from Trees, and 1 unique problem. The last question required counting numbers greater than B formed from a string. I solved 2 fully and partially solved the others, which led to my shortlisting. In the first technical round, I tackled two LeetCode problems: Burning Tree and Shortest Path to Get All Keys, writing complete code and dry runs. The second round was more ad-hoc, and I made it to the third round. The third round had two problems: Codeforces 2028C and a custom problem involving maximizing a sum with constraints. I suggested bitmask DP for small n and wrote the solution. The feedback was positive, and I got shortlisted in the end.

Interview Questions (5)

Q1
Count Numbers Greater Than B From String
Data Structures & Algorithms

Given a number in the form of a string (length up to 47) and an integer B, pick digits from the string (in order) to form numbers. The task was to count how many numbers greater than B can be formed.

Q2
Burning Tree
Data Structures & Algorithms

The problem required implementing a solution to burn a tree, likely involving tree traversal and dynamic programming techniques.

Q3
Shortest Path to Get All Keys
Data Structures & Algorithms

The problem involved finding the shortest path to collect all keys in a grid, which is a classic BFS or Dijkstra's algorithm problem.

Q4
Custom Problem: Maximize Sum with Constraints
Data Structures & Algorithms

Given a vector of pairs (a, b), you can pick any pair to start with. The next pair must satisfy a_next <= b_prev. The goal was to maximize the sum of all chosen b.

Q5
Codeforces 2028C
Data Structures & Algorithms

A problem from Codeforces 2028C, which involved some algorithmic challenge, though the exact details are not provided.

🏢 PhonePe Machine Coding Round – SDE Interview Experience
phonepe logo
Phonepe
SDE-1
July 20, 20254 reads

Summary

I experienced a Machine Coding Round for an SDE-1 role at PhonePe, where I was tasked with designing a Fitness Class Booking System, and successfully implemented key features including user management, class scheduling, booking with waitlists, and concurrency handling, using OOP principles and in-memory storage.

Full Experience

Role: SDE-1
Platform: Onsite/Online (Coding Environment Provided)
Round Type: Machine Coding (Duration: 90–120 mins)
Language Used: Java

💼 Problem Statement:

Design a Fitness Class Booking System with the following features:

👥 User Management:

  • Users can register/login with tier-based packages:
    • Platinum → 10 classes
    • Gold → 5 classes
    • Silver → 3 classes

📅 Class Management (Admin Functionality):

  • Create, schedule, and cancel fitness classes (e.g., Yoga, Gym)
  • Each class has a capacity and scheduled time

📌 Booking Functionality:

  • Users can book classes based on available slots and their tier limit
  • If the class is full → Add to waitlist
  • On cancellation, the first waitlisted user gets the slot

❌ Cancellation:

  • Users can cancel up to 30 minutes before the class
  • Cancelled bookings restore user’s quota

🔄 Concurrency:

  • Multiple users trying to book at the same time → Thread-safe booking logic was expected

🧠 My Approach:

  • Used OOP Design: Classes like User, FitnessClass, BookingService, etc.
  • Followed Separation of Concerns using service classes
  • Stored everything in-memory using HashMaps/List (no DB required)
  • Used synchronized blocks for thread safety
  • Hardcoded the main flow (register, create class, book, cancel, etc.) for quick testing

✅ Features Implemented:

  • User registration with package tiers
  • Admin can schedule classes
  • Class booking with capacity checks
  • Waitlist promotion after cancellation
  • Tier-wise booking limits
  • Concurrency-safe booking

Feel free to ask if anyone wants the code or detailed breakdown. Hope this helps for your upcoming rounds! ✌️

Interview Questions (1)

Q1
Design a Fitness Class Booking System
System DesignHard

Design a Fitness Class Booking System with the following features:

👥 User Management:

  • Users can register/login with tier-based packages:
    • Platinum → 10 classes
    • Gold → 5 classes
    • Silver → 3 classes

📅 Class Management (Admin Functionality):

  • Create, schedule, and cancel fitness classes (e.g., Yoga, Gym)
  • Each class has a capacity and scheduled time

📌 Booking Functionality:

  • Users can book classes based on available slots and their tier limit
  • If the class is full → Add to waitlist
  • On cancellation, the first waitlisted user gets the slot

❌ Cancellation:

  • Users can cancel up to 30 minutes before the class
  • Cancelled bookings restore user’s quota

🔄 Concurrency:

  • Multiple users trying to book at the same time → Thread-safe booking logic was expected

Preparation Tips

💡 Tips for Candidates:

  • Think in real-world object models
  • Start with core functionality, leave enhancements for later
  • Keep code modular and readable
  • Add comments to clarify assumptions and logic
  • Don’t forget edge cases (cancelling, waitlist promotion)
Phonepe Interview Experience (Software engineer 3-5Yoe)
phonepe logo
Phonepe
Software engineer4.6 years
July 18, 20254 reads

Summary

I experienced a Software Engineer interview at Phonepe, which consisted of a Machine Coding round, a Problem Solving/Data Structures round with two LeetCode problems, and a System Design round on Instagram news feed. I was rejected after the System Design round.

Full Experience

YOE:4.6

Round1:
MachineCoding round

nextday: Explanation of code written in Machine coding round

verdict: positive

Round2:

PS/DS

1. https://leetcode.com/problems/maximum-total-damage-with-spell-casting/description/
2. https://leetcode.com/problems/most-stones-removed-with-same-row-or-column/description/

verdict: postive

Round 3:
System design

Instagram news feed

verdict:Rejected

Interview Questions (3)

Q1
Maximum Total Damage With Spell Casting
Data Structures & Algorithms

Maximum Total Damage With Spell Casting

Q2
Most Stones Removed with Same Row or Column
Data Structures & Algorithms

Most Stones Removed with Same Row or Column

Q3
Instagram News Feed
System Design

Design Instagram news feed

PhonePe Software Engineer- Backend (0 to 3 Years) Pune
phonepe logo
Phonepe
Software Engineer- BackendPune2 years
July 16, 20253 reads

Summary

I interviewed for a Software Engineer- Backend role at PhonePe, Pune, which consisted of two Data Structures & Algorithms rounds and a managerial round including system design. I was ultimately rejected.

Full Experience

DSA round 1

Q1. Given an array of integers arr and a integer k, you have to remove exactly k elements either from the start or the end or a mix of both.

Return maximum sum of integers that can be removed

Example 1:
Input:

	arr = [1,2,3,4,5]
	k = 2
	
Output:
9

Example 2:
Input:

	arr = [5,1,2,3,4]
	k = 2
	
Output:
9

Q2. You are given a string s. You can add any character at any place in the string. Output the minimum number of characters that have to be added to string to make it a palindrome

Example 1:
Input:

	s = "abcd"
	
Output:
3

Example 2:
Input:

	s = "abac"
	
Output:
1

Example 3:
Input:

	s = "abdab"
	
Output:
2


DSA round 2

Q1. Given a string s, and integer k, you have to perform this operation as many times as possible:

Remove k consecutive characters from s which are same, and concatenate the left and right part.

Return the string after the above operation can no longer be performed.

Example 1:
Input:

	s = "abdc"
	k = 2
	
Output:
"abdc"

Example 2:
Input:

	s = "abbadc"
	k = 2
	
Output:
"dc"

Example 3:
Input:

	s = "pqqqqppeeeeepppqq"
	k = 5
	
Output:
"pq"

Q2. You are given a undirected graph G in form of adjacency matrix of size n x n, containing n nodes, indexed from 0 to n-1. You are also given a list of infected nodes infected.

A healthy node is infected if it connected to the infected node. At time t=0 the nodes in infected are the only nodes that are infected. But after time, more and more nodes get infected, as the infection propagates. Let's say at t=infinite, there are MAX_INFECTED nodes.

Now you can disinfect one and only one, at the start at t=0. Your task is to find a node n, disinfecting which will minimise the MAX_INFECTED nodes count. Print that node's index. If more that one node can cause minimum MAX_INFECTED, return the node with smallest index.

Example 1:
Input:

	G = [[1, 1, 0], [1, 1, 0], [0, 0, 1]]
	infected = [0, 2]
	
Output:
0

Example 2:
Input:

	G = [[1, 1, 0], [1, 1, 0], [0, 0, 1]]
	infected = [1, 2]
	
Output:
1

Example 3:
Input:

	G = [[1, 1, 0], [1, 1, 0], [0, 0, 1]]
	infected = [0, 1]
	
Output:
0

Explanation

3 nodes are there. node 0 and node 1 are connected, and node 2 is not connected to anything.

  • Example 1: removing infection from 0 will cause MAX_INFECTED = 1, which is minimum
  • Example 2: removing infection from 1 will cause MAX_INFECTED = 1, which is minimum
  • Example 3: removing infection from either 0 or 1 will cause MAX_INFECTED = 2, but 0 has smaller index, so res=0

Managerial round

  • Intro
  • Why changing company
  • Why phonepe
  • Current company project discussion in detail
  • What and why in current company project
  • Design blinkit. High variation in number of users of users and number of dark store per square area. (And a lot of roasting here)

Result

Rejected.

Interview Questions (9)

Q1
Remove K Elements for Max Sum
Data Structures & Algorithms

Given an array of integers arr and a integer k, you have to remove exactly k elements either from the start or the end or a mix of both.

Return maximum sum of integers that can be removed

Example 1:
    Input:
    

    arr = [1,2,3,4,5]
    k = 2
    
    Output:
     9

Example 2:
    Input:
    
    arr = [5,1,2,3,4]
    k = 2
    
    Output:
     9

Q2
Minimum Characters to Make Palindrome
Data Structures & Algorithms

You are given a string s. You can add any character at any place in the string. Output the minimum number of characters that have to be added to string to make it a palindrome

Example 1:
    Input:
    

    s = "abcd"
    
    Output:
     3


Example 2:
    Input:
    
    s = "abac"
    
    Output:
     1


Example 3:
    Input:
    
    s = "abdab"
    
    Output:
     2

Q3
Remove K Consecutive Same Characters
Data Structures & Algorithms

Given a string s, and integer k, you have to perform this operation as many times as possible:

Remove k consecutive characters from s which are same, and concatenate the left and right part.

Return the string after the above operation can no longer be performed.

Example 1:
    Input:
    

    s = "abdc"
    k = 2
    
    Output:
     "abdc"

Example 2:
    Input:
    
    s = "abbadc"
    k = 2
    
    Output:
     "dc"

Example 3:
    Input:
    
    s = "pqqqqppeeeeepppqq"
    k = 5
    
    Output:
     "pq"

Q4
Minimize Infected Nodes in Graph
Data Structures & Algorithms

You are given a undirected graph G in form of adjacency matrix of size n x n, containing n nodes, indexed from 0 to n-1. You are also given a list of infected nodes infected.

A healthy node is infected if it connected to the infected node. At time t=0 the nodes in infected are the only nodes that are infected. But after time, more and more nodes get infected, as the infection propagates. Let's say at t=infinite, there are MAX_INFECTED nodes.

Now you can disinfect one and only one, at the start at t=0. Your task is to find a node n, disinfecting which will minimise the MAX_INFECTED nodes count. Print that node's index. If more that one node can cause minimum MAX_INFECTED, return the node with smallest index.

Example 1:
    Input:
    

    G = [[1, 1, 0], [1, 1, 0], [0, 0, 1]]
    infected = [0, 2]
    
    Output:
     0


Example 2:
    Input:
    
    G = [[1, 1, 0], [1, 1, 0], [0, 0, 1]]
    infected = [1, 2]
    
    Output:
     1


Example 3:
    Input:
    
    G = [[1, 1, 0], [1, 1, 0], [0, 0, 1]]
    infected = [0, 1]
    
    Output:
     0

Explanation

3 nodes are there. node 0 and node 1 are connected, and node 2 is not connected to anything.

  • Example 1: removing infection from 0 will cause MAX_INFECTED = 1, which is minimum
  • Example 2: removing infection from 1 will cause MAX_INFECTED = 1, which is minimum
  • Example 3: removing infection from either 0 or 1 will cause MAX_INFECTED = 2, but 0 has smaller index, so res=0

Q5
Introduction
Behavioral

Tell me about yourself.

Q6
Why are you changing companies?
Behavioral

Why changing company

Q7
Why PhonePe?
Behavioral

Why phonepe

Q8
Current Company Project Discussion
Behavioral

Current company project discussion in detail. What and why in current company project

Q9
Design Blinkit
System Design

Design blinkit. High variation in number of users of users and number of dark store per square area.

PhonePe Machine Coding Question
phonepe logo
Phonepe
July 14, 20255 reads

Summary

I was presented with a machine coding problem from PhonePe that required designing a backend for a hackathon platform, incorporating features for problem management, user registration, scoring, leaderboards, and a recommendation system.

Full Experience

PhonePe is conducting its annual hackathon and wants to create an interactive platform to host the event. It will be a 2 day event and contestants need to maximize their score over this period by either solving more problems or more difficult problems. Design the backend to support this platform.

**Mandatory Functionalities ** The system should have the capability to add problems to the Questions Library. Contestants should be able to register themselves with their name and their department name. A problem should have attributes like description, tag, difficulty level (easy, medium, hard), score. Contestants should be able to filter problems based on difficulty level or tags and sort them based on score (design should be extensible to other attributes ) A contestant should be able to solve a problem as well as get the list of problems solved by him/her. A contestant should be able to see the number of users that have solved a given problem and average time taken to solve that problem. Scoring strategy for a problem could simply be to award the score assigned for the problem or could be something different like a combination of score and time. Return the current leader of the contest Users should be able to get curations like Top 10 most liked problems of a certain tag. Extension Problem

On solving a problem, users should get a recommendation of top 5 problems based on relevance The recommendation strategy for problems could simply be similar tags or extensible to include other factors like number of users who have solved a particular problem or a combination of factors ( Design should be extensible). Capabilities

Below are various functions that should be supported with necessary parameters passed. These are just suggestions, the signatures can be altered as long as the functionalities are provided.

Registering a problem - addProblem() Registering a user - addUser() Fetch the list of problems - fetchProblems() - Should take as input filtering and sorting criterias and return all matching problems in the right order. The result should contain problem attributes like name, tag, difficulty level, score etc. Should also display number of users who have solved a problem and the average time taken for that problem Solve a problem - solve() - Exposed to a contestant to mark a problem as solved [ For the extension problem, this function should return next 5 recommended problems ] Fetch solved problems for a user - fetchSolvedProblems() - Fetch the list of solved problems for a user Get leader - getLeader() - Returns the name and department of the leader Get top n liked problems of a certain tag - getTopNProblems()

Interview Questions (1)

Q1
Design a Hackathon Platform Backend
System DesignHard

PhonePe is conducting its annual hackathon and wants to create an interactive platform to host the event. It will be a 2 day event and contestants need to maximize their score over this period by either solving more problems or more difficult problems. Design the backend to support this platform.

**Mandatory Functionalities ** The system should have the capability to add problems to the Questions Library. Contestants should be able to register themselves with their name and their department name. A problem should have attributes like description, tag, difficulty level (easy, medium, hard), score. Contestants should be able to filter problems based on difficulty level or tags and sort them based on score (design should be extensible to other attributes ) A contestant should be able to solve a problem as well as get the list of problems solved by him/her. A contestant should be able to see the number of users that have solved a given problem and average time taken to solve that problem. Scoring strategy for a problem could simply be to award the score assigned for the problem or could be something different like a combination of score and time. Return the current leader of the contest Users should be able to get curations like Top 10 most liked problems of a certain tag. Extension Problem

On solving a problem, users should get a recommendation of top 5 problems based on relevance The recommendation strategy for problems could simply be similar tags or extensible to include other factors like number of users who have solved a particular problem or a combination of factors ( Design should be extensible). Capabilities

Below are various functions that should be supported with necessary parameters passed. These are just suggestions, the signatures can be altered as long as the functionalities are provided.

Registering a problem - addProblem() Registering a user - addUser() Fetch the list of problems - fetchProblems() - Should take as input filtering and sorting criterias and return all matching problems in the right order. The result should contain problem attributes like name, tag, difficulty level, score etc. Should also display number of users who have solved a problem and the average time taken for that problem Solve a problem - solve() - Exposed to a contestant to mark a problem as solved [ For the extension problem, this function should return next 5 recommended problems ] Fetch solved problems for a user - fetchSolvedProblems() - Fetch the list of solved problems for a user Get leader - getLeader() - Returns the name and department of the leader Get top n liked problems of a certain tag - getTopNProblems()

PhonePe Software Engineer (3-5 yrs) | Reject
phonepe logo
Phonepe
Software Engineer
July 10, 20252 reads

Summary

I interviewed for a Software Engineer position at PhonePe and was rejected. The process included a machine coding round, two DSA rounds, and a system design round. I found the system design interviewer to be particularly challenging.

Full Experience

Hi All,

I received phonepe interview after applying on their career site. Recruiter sent me a machine coding problem and I had 1 day to submit it.

Machine Coding Question Design and implement a battleship game to be played between two players until one comes out as the winner. A player wins When all the ships of his opponent has been destroyed. Missiles are fired randomly and they should not be fired at the same location twice.

Round 1 Solution discussion of machine coding round. Added functionality that there should be two modes automatic fire and manual fire. Follow up question what if missile has a range and it can destroy all the blocks in its range in all 8 directions.

Round 2 1235 Maximum profit in job scheduling

1657 Determine if two strings are close

solved first one completely and gave approach for the second one didn't have time to code second.

Round 3 System Design: Design a service which registers triggers with delays, from other services and sends them response of the trigger after the time is completed for that trigger.

Verdict: Rejected. Felt like system design interviewer was not nice at all, had lot of attitude. He started grilling me on API request and response body. Didn't even let me have a flow at any point in the interview.

Interview Questions (4)

Q1
Design Battleship Game
Other

Design and implement a battleship game to be played between two players until one comes out as the winner. A player wins When all the ships of his opponent has been destroyed. Missiles are fired randomly and they should not be fired at the same location twice.

Q2
Maximum Profit in Job Scheduling
Data Structures & AlgorithmsHard

LeetCode problem 1235. You are given N jobs, where job i has a start time startTime[i], an end time endTime[i], and a profit profit[i]. You want to choose a subset of jobs (with non-overlapping time intervals) such that the total profit is maximized.

Q3
Determine if Two Strings Are Close
Data Structures & AlgorithmsMedium

LeetCode problem 1657. Two strings are considered 'close' if you can obtain one from the other using specific operations (swap any two existing characters, or transform every occurrence of one character into another character and vice versa).

Q4
Design Delayed Trigger Service
System Design

Design a service which registers triggers with delays, from other services and sends them response of the trigger after the time is completed for that trigger.

PhonePe Interview Experience
phonepe logo
Phonepe
SDE II
July 2, 20251 reads

Summary

I interviewed with PhonePe for an SDE II role. The process included a machine coding round, code review, DSA, and system design. Despite a strong performance in DSA and code review, I was ultimately rejected after the system design round due to insufficient depth.

Full Experience

I recently interviewed with PhonePe for their SDE II role. Here's how it went.

First Round – Machine Coding Round This round was scheduled by the recruiter via zoom, where I was provided a link to a coding pad with the question. I had to submit the solution via email within 1.5 hours. I was allowed to solve this offline on my editor. It was a typical object-oriented design question. Though I don’t have the exact question now, many similar problems are shared on GitHub by past candidates. I was expected to implement 6–7 functions. You are not expected to complete everything so do it sequentially. I managed to complete all 7 functions, even though there were mistakes in the last one.

The focus was clearly on implementing a working solution in a short timeframe while ensuring modularity, scalability, and OOPs.

The very next day, the recruiter reached out to schedule a follow-up with engineers to discuss the code.

Second Round – Code Review & Deep Dive This was essentially a code walkthrough with two engineers from the team. Using the example they'd provided, I explained the flow and logic across each function.

They asked questions around concurrency and thread safety. My code was not thread safe and I told them in the interest of velocity I have written this, but ya i would introduce locks otherwise. They also asked some questions around different scenarios and how I would implement that.

It felt more like a peer review than a grilling interview, and overall, the round went smoothly.

Third Round – DSA and Problem Solving I was asked two LeetCode-style questions:

Matchsticks to Square: I initially misread the example due to confusion around the input format, which cost me a bit of time. But once I understood the problem, I discussed my approach and time complexity. The interviewer seemed satisfied and we moved to the next question.

Kth Smallest Element in a Sorted Matrix: I discussed a bunch of solutions and decided that using a min heap would be the best solution. He hinted it could be optimized further. I could not think of a way, so he mentioned binary search, and gave me another hint around it, and then I could solve it.

This round went really well in my opinion. I prefer interviews like this, where the focus is on how you think, how you explore edge cases, build up your reasoning, and adapt with hints. I’d take this kind of discussion any day over an interview where he gets hung up on remembering syntax or using APIs/methods verbatim. This felt collaborative, not combative hahaha, and that makes a world of difference.

Fourth Round – System Design The final round was a system design round to design Instagram. After discussing scope and expectations, we narrowed it down to four main features:

  1. Posting content
  2. Seeing one's own posts immediately after posting.
  3. Feed generation
  4. Likes and Comments

I discussed the qualities of the system (non-functional) and set my scale expectations well. From there, I outlined a high-level design and then looked into each of the services. While I covered the core architecture and trade-offs, I realized later that I didn’t allocate enough time to flesh out the likes/comments service fully. I hand-waved a bit near the end as I was short on time.

Result: Rejected on the last round 😞

Outcome & Reflections The process was progressive—I would proceed to the next round only if I cleared the previous. Recruiter mentioned that the team had a meeting to discuss my case, since only the last round was not up to the mark. Ultimately, the feedback on the final round wasn’t strong enough to move ahead.

In hindsight, I could’ve paced the discussion better and spent more time detailing data flow and scaling for likes/comments. I did check with the interviewer throughout to ensure the direction was right—but I missed some depth where it mattered. That said, the round still felt constructive and insightful, had time allowed, I know I could’ve taken it further.

Interview Questions (3)

Q1
Matchsticks to Square
Data Structures & Algorithms

Matchsticks to Square

Q2
Kth Smallest Element in a Sorted Matrix
Data Structures & Algorithms

Kth Smallest Element in a Sorted Matrix

Q3
Design Instagram
System Design

Design Instagram. After discussing scope and expectations, we narrowed it down to four main features:

  1. Posting content
  2. Seeing one's own posts immediately after posting.
  3. Feed generation
  4. Likes and Comments

I discussed the qualities of the system (non-functional) and set my scale expectations well. From there, I outlined a high-level design and then looked into each of the services.

PhonePe | SDE2 | Machine Coding Round
phonepe logo
Phonepe
SDE II
June 26, 20253 reads

Summary

I participated in a Machine Coding Round for the SDE2 position at PhonePe, which involved designing and implementing an advertisement engine with specific functional and system constraints.

Full Experience

Problem Statement Design and implement an advertisement engine. The system manages Advertisers, Ads, and User Ad requests. It must select and serve the most relevant Ad based on matching criteria, bidding amount, and system constraints while respecting budget constraints.

Different terminology:

Advertiser: An entity that publishes advertisements on the platform. Advertisers also keep their advertisement budget on the platform. User: An entity that uses the platform and consumes advertisements with other use cases on the platform. Bid Amount: Bid amount is the amount earned per advertisement by the platform from the advertiser. If the Bid amount is higher, then there are more chances of the advertisement getting served to the customer. Advertisement Campaign: The Advertiser creates advertisement campaigns on the platform. The advertiser provides info such as URL, content_type (image, video), and bid per Ad. matching, and targeting attributes such as age, interest, and gender, etc., with the campaign. System Constraints: The Platform will have some constraints and will be checked against all the advertisements before matching. Advertisement Matching: The platform provides advertisements, comparing user details and attributes with all the active campaign requirements. It also compares the bid amount with the existing budget and checks for all the given system constraints for advertisement serving to find the best-matching advertisement. Once an advertisement is served, the budget is reduced from the advertiser’s account. An advertisement is served only when the bid amount is less than the existing budget.

Requirements P0 Provide interfaces to add advertisers and their budgets. add_advertiser(name) add_budget(budget) Provide interfaces to add users and their attributes to the system, such as date of birth, interests, gender, etc. add_user(user, dob, gender) add_attribbute(attributes) Provide an interface to create an advertisement campaign for the advertiser. create_campaign(advertiser_id, bid_amount, url, type, age, city, constraints) Provide an interface to request best best-matching advertisement from the system. This should return a single advertisement per API call. match_advertisement(user_id, city) All the above api syntaxes are symbolic. Please design and write the method names, method parameters as per the best coding practices.

System Constraints:

A user shouldn’t see the same advertisement if he has seen it in the last 10 fetch instances. At the global level, don’t serve the same advertisement if it has been served 5 times in the last 1 minute. match_advertisement can return null if all the advertisements after the criteria matching fail the system constraints validation for a user.

Requirements P1 Handle concurrency cases for different scenarios. Handling if more system constraints keep getting added to fetch advertisements.

Things to keep in mind You are only allowed to use in-memory data structures You are NOT allowed to use any databases You are NOT required to have a full-fledged web service or APIs exposed You are required to showcase the working of the above concept. Just a main class that simulates the above operations is enough. Provide some valid test cases as well. Should you have any doubts, you are allowed to make appropriate assumptions, as long as you can explain them during the evaluation. You are allowed to code on your favorite IDEs as long as you paste the code back into the tool within the allotted time frame How you will be evaluated You are expected to write production-quality code while implementing the requirements. We look for the following:

Separation of concerns Abstractions Application of OO design principles Testability Code readability Language proficiency [execution time limit] 1 seconds (cpp)

[memory limit] 2g

Interview Questions (1)

Q1
Design and Implement an Advertisement Engine (Machine Coding)
System DesignHard

Design and implement an advertisement engine. The system manages Advertisers, Ads, and User Ad requests. It must select and serve the most relevant Ad based on matching criteria, bidding amount, and system constraints while respecting budget constraints.

Different terminology:

Advertiser: An entity that publishes advertisements on the platform. Advertisers also keep their advertisement budget on the platform. User: An entity that uses the platform and consumes advertisements with other use cases on the platform. Bid Amount: Bid amount is the amount earned per advertisement by the platform from the advertiser. If the Bid amount is higher, then there are more chances of the advertisement getting served to the customer. Advertisement Campaign: The Advertiser creates advertisement campaigns on the platform. The advertiser provides info such as URL, content_type (image, video), and bid per Ad. matching, and targeting attributes such as age, interest, and gender, etc., with the campaign. System Constraints: The Platform will have some constraints and will be checked against all the advertisements before matching. Advertisement Matching: The platform provides advertisements, comparing user details and attributes with all the active campaign requirements. It also compares the bid amount with the existing budget and checks for all the given system constraints for advertisement serving to find the best-matching advertisement. Once an advertisement is served, the budget is reduced from the advertiser’s account. An advertisement is served only when the bid amount is less than the existing budget.

Requirements P0 Provide interfaces to add advertisers and their budgets. add_advertiser(name) add_budget(budget) Provide interfaces to add users and their attributes to the system, such as date of birth, interests, gender, etc. add_user(user, dob, gender) add_attribbute(attributes) Provide an interface to create an advertisement campaign for the advertiser. create_campaign(advertiser_id, bid_amount, url, type, age, city, constraints) Provide an interface to request best best-matching advertisement from the system. This should return a single advertisement per API call. match_advertisement(user_id, city) All the above api syntaxes are symbolic. Please design and write the method names, method parameters as per the best coding practices.

System Constraints:

A user shouldn’t see the same advertisement if he has seen it in the last 10 fetch instances. At the global level, don’t serve the same advertisement if it has been served 5 times in the last 1 minute. match_advertisement can return null if all the advertisements after the criteria matching fail the system constraints validation for a user.

Requirements P1 Handle concurrency cases for different scenarios. Handling if more system constraints keep getting added to fetch advertisements.

Things to keep in mind You are only allowed to use in-memory data structures You are NOT allowed to use any databases You are NOT required to have a full-fledged web service or APIs exposed You are required to showcase the working of the above concept. Just a main class that simulates the above operations is enough. Provide some valid test cases as well. Should you have any doubts, you are allowed to make appropriate assumptions, as long as you can explain them during the evaluation. You are allowed to code on your favorite IDEs as long as you paste the code back into the tool within the allotted time frame How you will be evaluated You are expected to write production-quality code while implementing the requirements. We look for the following:

Separation of concerns Abstractions Application of OO design principles Testability Code readability Language proficiency [execution time limit] 1 seconds (cpp)

[memory limit] 2g

PhonePe Interview Experience
phonepe logo
Phonepe
Software Engineer - Backend4 years
June 13, 20251 reads

Summary

I interviewed for the Software Engineer - Backend role at PhonePe, undergoing an online coding assessment, a machine coding round for a Payment Gateway System, a system design round for Search Autocomplete, and a hiring manager round. I was successfully selected.

Full Experience

Software Engineer profile - Backend
4+ years of experience


Online Round:
Initial Coding Assessment - 2 Coding questions. Leetcode Medium.


Virtual Interviews:
1st Round: Machine Coding Round
Duration: 1 to 1.5 hours
- Was asked to create a working code of Payment Gateway System.
With Multiple features related to it.
Reference: www.youtube.com/watch?v=shipSEFMzHs

2nd Round: System Design Round
Duration: 1 hour
- Was asked to design a Search Autocomplete feature.
Trie data structure needs to be used and I created a entire working solution. Discussed on its scalablility and handle different scenarios and discussion on optimisation of memory and time complexity.

3rd Round: Hiring Manager Round
Duration: 0.5 hour
- Mostly questions were on why are you looking for a change and other behavioural questions regarding agile and others.



Got Selected!

Interview Questions (3)

Q1
Design a Payment Gateway System
System Design

I was asked to create a working code of a Payment Gateway System with multiple related features. A reference was provided.

Q2
Design Search Autocomplete with Trie
System Design

I was asked to design a Search Autocomplete feature. Trie data structure needs to be used. Discussion included scalability, handling different scenarios, and optimization of memory and time complexity.

Q3
Behavioral and Agile Methodology Questions
Behavioral

I was asked about my reasons for looking for a change and other behavioral questions, including topics related to agile methodologies.

PhonePe Interview Experience | Offer | Accepted | SDE(Android) | Bengaluru
phonepe logo
Phonepe
SDE(Android)Bengaluru1.5 years
June 8, 20253 reads

Summary

I interviewed with PhonePe for an SDE (Android) role in Bengaluru. The interview process initially had 4 rounds (DSA, Android Platform, Machine Coding, HM), but due to an average performance in the DSA round, I had to undergo an additional Bar-Raiser Round. After successfully clearing all rounds, I received an offer.

Full Experience

Hi guys so recently I had the opportunity to interview with PhonePe as I was already on my notice period in Inmobi-Glance and I was having an offer from ShareChat which I also had shared earlier.

I got this interview through a referral from a PhonePe employee.

So the interview initially consisted of 4 Rounds only for SDE (Android) role. And those were:

  • DSA Round
  • Android Platform Round
  • Machine Coding Round (Android)
  • HM Round

Let's go thorugh each and every round one by one-

DSA Round - In this round I was asked 2 DSA questions. The time duration of this round was 1 hour only and I had to solve both the questions in that time limit only.

The first question was from Graphs topic and I must say that I am not very strong in Graphs and I was not expecting any Graphs question but it was my first question.

Question was similar to : https://leetcode.com/problems/loud-and-rich/description/

Literally I took a lot of time to firstly understand the problem then came to an unoptimised approach to which interviewer was not that happy.

Then after 30 minutes he presented me another question.

Question was: https://leetcode.com/problems/jump-game-ii/description/

I solved this problem optimially before the given time limit and the interviewer was happy with my solution.

I totally lost my hope for next round but luckily I got call from recruiter the next day for next round :)

Android Platform Round - This round mainly revolved around basic android topics like ViewModel and its working, Activities, Fragments, Jetpack Compose.

Interviewer mainly dig deeper on topics like Services and its usecases which I comfortably answered.

There was no question from his side which I was not able to answer correctly.

Got a call from recruiter that I had cleared this round as well. Scheduled my next round the same day.

Machine Coding Round - In this round I was given a problem to design a E-Commerce app and how will I be managing the data between different screens.

The data should also be synced with the backend servers.

SO I basically was given some 4-5 criterias or features to complete in 90 minutes with scalable and clean code.

I followed MVVM + Clean Architecture in Android for this round. Firstly I told my approach to the interviewer and discussed a bit on this part.

Then when we were on same ground I started coding and I did it really fast as I had to complete all the features in the given time limit.

I did exceptionally well in this round that interviewer even praised me at last.

Then I got a call that I am eligible for HM Round. It was then scheduled for the next day.

HM Round - In this round the Hiring Manager discussed about my experience at Inmobi-Glance and I told whatever I had done in my 1.5 years of FTE at Inmobi-Glance.

Then he passed me an open ended question to design a map app and I had to tell him my approach in such a way that it is optimal and can be transformed into a market ready app with that approach.

We discussed a lot and then he asked some really tough behavioural questions to me which I answered confidently.

I felt this round as the most difficult one.

Unexpected happened : I was celebrating my farewell at my office (Inmobi-Glance) and I was pretty confident to get the offer that dat on May 30. Then HR called me and told me that there is a good and a bad news for me. I was shocked to hear this.

He told me that the collective feedback is mostly positive and they can consider me for an offer but I had to go through a Bar-Raiser Round due to my average performance in DSA Round

I literally was weeping from inside and multiple thoughts were running in my mind like: "May be they have found someone else that's why to reject me taking another round" etc etc.

But still I somehow managed myself and I agreed to his request.

The fact was that I also did not have any laptop to prepare for this round as I had submitted my mac back to my organization (Inmobi-Glance).

I borrowed a laptop from my friend and logged in my leetcode account and started preparing from next day.

Bar-Raiser Round - In this round I was asked 2 questions. And this round I would say was the most easy round.

The first question was based on "Min-Heap" which I solved optimally.

The second question was based on some strings like some word and pattern problem. I solved this also optimally.

Then that evening I got a call from recruiter that I had successfully cleared this round as well.

They were ready to give me an offer. And after 2-3 days I had my compensation call with my HM.

There we discussed my compensation.

Compensation details: https://leetcode.com/discuss/post/6817292/phonepe-offer-software-development-engin-e294/

Interview Questions (5)

Q1
Loud and Rich
Data Structures & AlgorithmsMedium
Q2
Jump Game II
Data Structures & AlgorithmsMedium
Q3
E-Commerce App Design with Data Sync
System Design

I was given a problem to design an E-Commerce app and manage data between different screens. The data also needed to be synced with backend servers. I had 90 minutes to complete 4-5 criteria/features with scalable and clean code.

Q4
Design a Map App
System Design

An open-ended question to design a map app. I had to describe an optimal approach that could be transformed into a market-ready application.

Q5
Behavioral Questions
Behavioral

The Hiring Manager asked some really tough behavioral questions.

Preparation Tips

For the Bar-Raiser Round, as I did not have my laptop, I borrowed one from a friend, logged into my LeetCode account, and started preparing from the next day.

Phonepe Software Engineer | Reject
phonepe logo
Phonepe
Software Engineer
May 31, 20254 reads

Summary

I interviewed for a Software Engineer position at Phonepe and was rejected after three rounds, which included machine coding, data structures & algorithms, and system design.

Full Experience

Round 1 -

Machine coding pendency system

Round 2 -

Snake and ladder dsa

two pointer basic question

Round 3 -

Design shazam , hld

Interview Questions (3)

Q1
Machine Coding: Pendency System
Other

Implement a machine coding pendency system.

Q2
Snake and Ladder (DSA)
Data Structures & Algorithms

Solve the classic Snake and Ladder game using Data Structures and Algorithms.

Q3
System Design: Shazam (HLD)
System DesignHard

Design the Shazam application, focusing on High-Level Design (HLD).

PhonePe | SE (backend) 1 - 3 years DSA round | Interview
phonepe logo
Phonepe
SE (backend)2 years
May 19, 20252 reads

Summary

I applied online for a Software Engineer (backend) role at PhonePe and faced two DSA questions in the interview, which I was unable to solve.

Full Experience

yoe: 2yrs applied online

previous round

was asked two DSA questions

  1. https://leetcode.com/problems/burst-balloons/ (hard)
  2. the celebrity problem (medium)

interviewer was nice and helped where ever they could. Wasn't able to solve any of them.

Interview Questions (2)

Q1
Burst Balloons
Data Structures & AlgorithmsHard

Given n balloons, indexed from 0 to n - 1. Each balloon has a number printed on it representing its point value. You are asked to burst all the balloons. If you burst balloon i, you will get nums[left] * nums[i] * nums[right] points. left and right are adjacent indices of i. After the burst, the left and right then become adjacent. Find the maximum points you can collect by bursting the balloons wisely.

Q2
The Celebrity Problem
Data Structures & AlgorithmsMedium

In a party of N people, a celebrity is a person who is known by everyone but does not know anyone. You are given a square matrix M[][] of size N x N where M[i][j] = 1 if i knows j, and M[i][j] = 0 otherwise. Your task is to find the celebrity in the party. If a celebrity is present, find their index (0-indexed). If no celebrity is present, return -1. You may assume that the knows(A, B) function is available which returns true if A knows B, and false otherwise.

PhonePe | Software Engineer (Backend) | Machine Coding
phonepe logo
Phonepe
Software Engineer (Backend)2 years
May 19, 20253 reads

Summary

I had a machine coding interview for a Software Engineer (Backend) role at PhonePe, where I was given two hours to design and implement a fitness class booking application. I successfully moved to the second round after explaining my design and code quality, and also addressed a follow-up coding problem during the interview.

Full Experience

YOE: 2 years

Was given two hours to code this as an assignment. Question was held on codesignal, but you could use any IDE of your preference. You just need to mail the code. Interview was held 5 days later after submitting this assignment. You have to go through your code and explain your design.

Interviewer will judge you on the basis of your code quality, were you able to make it executable.

If you need C++ code for this just drop your email/linkedin/whatever. I can send you.

Verdict: was able to move to second round.

In interview

was asked to implement a method such that user shouldn't be able to book a class it has already booked a class in same timeslot. (was given 5 mins for that)

Interview Questions (2)

Q1
Design and Implement a Fitness Class Booking System
System DesignHard

Objective: Design and implement an application to allow users to choose and book fitness classes. The application should cater to user management, class scheduling, and booking, including waitlisting and cancellation features. Requirements:

User Management:

Registration and Login: Users should be able to register and log in to the system. User Tiers: Users can be categorized into three tiers: Platinum, Gold, and Silver. Each tier has a different booking limit: Platinum: 10 classes Gold: 5 classes Silver: 3 classes Packages: The user tiers align with the packages, determining the number of classes a user can book. Classes: Types: Classes can include yoga, gym, and dance etc etc. Capacity: Each class has a maximum number of attendees. Scheduling: Classes are scheduled at specific times, and multiple classes can run in a single day. Booking: Users can book a class if it has not reached capacity. An admin can create, schedule, and cancel classes. Waitlisting: If a class is full, users can join a waitlist. When a booked user cancels, the first user on the waitlist is allocated the slot. Cancellation: Users can cancel their booking up to 30 minutes before the class starts. Admins can also cancel classes. Methods: This is just to help you understand. Actual implementation may differ. User Management: Register/Login, Select Package

Classes (Admin): Create a class, Schedule a class, Cancel a class

Booking (User): Book a class, Cancel a class

Additional Considerations:

  1. Users should be able to book classes at different times.
  2. Concurrency management for multiple users trying to book the same class simultaneously.
  3. Handling package strategies effectively.
  4. Ensuring that user cancellations restore their booking quota.

Evaluation Criteria:

Design:

  • Use of object-oriented design principles (classes, interfaces, inheritance, polymorphism).
  • Efficiency and scalability of data structures.
  • Flexibility and modularity of system components.
  • Consideration of security and data privacy principles.

Implementation:

  • Functionality and accuracy of system features.
  • Performance and resource optimization of algorithms.
  • Code readability, maintainability, and adherence to coding standards.
  • Error handling and exception management for smooth operation.

Expectations:

  • Provide clean, professional-level code.
  • Model core entities and relationships effectively.
  • Demonstrate the solution with a method-based approach.
  • Use memory-based object storage; a backend database is not required.

[execution time limit] 0.5 seconds (cpp)

[memory limit] 2g

Q2
Prevent Booking Multiple Classes in Same Timeslot
Data Structures & AlgorithmsMedium

In interview was asked to implement a method such that user shouldn't be able to book a class it has already booked a class in same timeslot. (was given 5 mins for that)

PhonePe | SDE2 | Machine Coding Round
phonepe logo
Phonepe
SDE II
May 7, 20254 reads

Summary

My machine coding round for the SDE2 role at PhonePe required designing a complaint resolution system to manage unsuccessful transactions, outlining features for customers, agents, and admins, along with detailed system and implementation requirements.

Full Experience

The task is to design a complaint resolution system to manage unsuccessful transactions. Key features include:

Customers can log issues for failed or pending transactions by providing details like issue type, subject, description, and email.

Customer Service Agents:

  • Handle only one issue at a time.
  • Can search issues by ID or customer email.
  • Can resolve issues and receive new ones.

Admins:

  • Can onboard agents with specific expertise (issue types).
  • Can view the work history of agents.

System Requirements:

  • Assign issues to free agents using an assignment strategy.
  • Track and filter issues.
  • Maintain resolution history.

Implementation requirements: createIssue(transactionId, issueType, subject, description, email) addAgent(agentEmail, agentName ,List) assignIssue(issueId) // -> Issue can be assigned to the agents based on different strategies. For now, assign to any one of the free agents. getIssues(filter) // -> issues against the provided filter, e.g.: getIssue({"email": "testUser2@test.com"}); updateIssue(issueId, status, resolution) resolveIssue(issueId, resolution) viewAgentsWorkHistory() // -> a list of issue which agents worked on

Interview Questions (1)

Q1
Design a Complaint Resolution System
System DesignHard

Design a complaint resolution system to manage unsuccessful transactions. Key features include:

Customers can log issues for failed or pending transactions by providing details like issue type, subject, description, and email.

Customer Service Agents:

  • Handle only one issue at a time.
  • Can search issues by ID or customer email.
  • Can resolve issues and receive new ones.

Admins:

  • Can onboard agents with specific expertise (issue types).
  • Can view the work history of agents.

System Requirements:

  • Assign issues to free agents using an assignment strategy.
  • Track and filter issues.
  • Maintain resolution history.

Implementation requirements: createIssue(transactionId, issueType, subject, description, email) addAgent(agentEmail, agentName ,List) assignIssue(issueId) // -> Issue can be assigned to the agents based on different strategies. For now, assign to any one of the free agents. getIssues(filter) // -> issues against the provided filter, e.g.: getIssue({"email": "testUser2@test.com"}); updateIssue(issueId, status, resolution) resolveIssue(issueId, resolution) viewAgentsWorkHistory() // -> a list of issue which agents worked on

Phonepe Interview for - SDE1 backend 0-3 yrs exp Pune
phonepe logo
Phonepe
SDE1 backendPune1 years
April 23, 20254 reads

Summary

I applied for an SDE1 backend role at Phonepe through Instahyre, went through a coding assessment, two DSA rounds, and a Hiring Manager round, but was ultimately rejected due to perceived lack of skills and cultural fit.

Full Experience

Recruiter reached out on 5th April through my application on Instahyre.

My details: Experience - 1 yr Current comp - 3 LPA

1st round - Coding assessment on CodeSignal for 70 mins It had 4 questions, 1 was easy, 2 were medium-hard, 1 was hard

I cleared the assessment after solving all questions.

Recruiter reached out a day after my assessment for 2nd round

2nd round - DSA and problem solving on Gmeet for one hour

There were two interviewers who asked leetcode medium questions, I dont exactly remember but they were related to arrays and trees.

Recruiter reached out on the same day for 2nd round and scheduled interview for 3 days later.

3rd round - DSA and problem solving on Gmeet for one hour Asked two questions-

  1. Given a binary tree, find the list of elements which are at 'k' distance from the given target node.
  2. Asked to implement stack and also to retrieve minimum element of the stack at any point of time.

Solved both the question in one hour.

Recruiter reached out for Hiring Manager round next day and scheduled after 4 days

4th round - Hiring Manager round Asked basic questions which are mentioned on my resume, and asked about the architecture and current project I'm working on in the current company. Later went on to ask some behavioral and situational questions. Asked current comp and expected comp?? Idk if managers can ask, but whatever.

I reached out to recruiter next day and she said Hiring manager rejected and feedback was "My knowledge in skills was not as expected and did not seem culturally fit to work in the environment"

Interview Questions (2)

Q1
Nodes at K Distance in Binary Tree
Data Structures & Algorithms

Given a binary tree, find the list of elements which are at 'k' distance from the given target node.

Q2
Implement Stack with Min Function
Data Structures & Algorithms

Asked to implement stack and also to retrieve minimum element of the stack at any point of time.

PhonePe | Maching Coding | 90 Mins | 3-5 YOE | March 2025
phonepe logo
Phonepe
April 1, 20253 reads

Summary

This post details a 90-minute machine coding interview at PhonePe, where I was asked to design the backend for an interactive hackathon platform, including functionalities like problem management, user registration, scoring, filtering, and recommendations.

Full Experience

Duration: 90 Mins Coding + 15 Mins Evaluation

PhonePe is conducting its annual hackathon and wants to create an interactive platform to host the event. It will be a 2 day event and contestants need to maximize their score over this period by either solving more problems or more difficult problems. Design the backend to support this platform.

Mandatory Functionalities

The system should have the capability to add problems to the Questions Library. Contestants should be able to register themselves with their name and their department name. A problem should have attributes like description, tag, difficulty level (easy, medium, hard), score. Contestants should be able to filter problems based on difficulty level or tags and sort them based on score (design should be extensible to other attributes ) A contestant should be able to solve a problem as well as get the list of problems solved by him/her. A contestant should be able to see the number of users that have solved a given problem and average time taken to solve that problem. Scoring strategy for a problem could simply be to award the score assigned for the problem or could be something different like a combination of score and time. Return the current leader of the contest Users should be able to get curations like Top 10 most liked problems of a certain tag. Extension Problem

On solving a problem, users should get a recommendation of top 5 problems based on relevance The recommendation strategy for problems could simply be similar tags or extensible to include other factors like number of users who have solved a particular problem or a combination of factors ( Design should be extensible). Capabilities

Below are various functions that should be supported with necessary parameters passed. These are just suggestions, the signatures can be altered as long as the functionalities are provided.

Registering a problem - addProblem() Registering a user - addUser() Fetch the list of problems - fetchProblems() - Should take as input filtering and sorting criterias and return all matching problems in the right order. The result should contain problem attributes like name, tag, difficulty level, score etc. Should also display number of users who have solved a problem and the average time taken for that problem Solve a problem - solve() - Exposed to a contestant to mark a problem as solved [ For the extension problem, this function should return next 5 recommended problems ] Fetch solved problems for a user - fetchSolvedProblems() - Fetch the list of solved problems for a user Get leader - getLeader() - Returns the name and department of the leader Get top n liked problems of a certain tag - getTopNProblems() Guidelines

You should store the data in-memory using a language-specific data-structure. Implement clear separation between your data layers and service layers. Simple and basic function are expected as entry point - no marks for providing fancy * restful API or framework implementation Because this is a machine coding round, heavy focus would be given on data modeling, code quality etc, candidate should not focus too much time on algo which compromises with implementation time Expectations:

Your code should cover all the mandatory functionalities explained above. Your code should be executable and clean. Your code should be properly refactored, and exceptions should be gracefully handled. Appropriate errors should be displayed on the console How will you be evaluated?

Code Should be working Code readability and testability Separation Of Concerns Abstraction Object-Oriented concepts. Language proficiency. Scalability

Interview Questions (1)

Q1
PhonePe Hackathon Platform Backend Design
System DesignHard

Duration: 90 Mins Coding + 15 Mins Evaluation

PhonePe is conducting its annual hackathon and wants to create an interactive platform to host the event. It will be a 2 day event and contestants need to maximize their score over this period by either solving more problems or more difficult problems. Design the backend to support this platform.

Mandatory Functionalities

The system should have the capability to add problems to the Questions Library. Contestants should be able to register themselves with their name and their department name. A problem should have attributes like description, tag, difficulty level (easy, medium, hard), score. Contestants should be able to filter problems based on difficulty level or tags and sort them based on score (design should be extensible to other attributes ) A contestant should be able to solve a problem as well as get the list of problems solved by him/her. A contestant should be able to see the number of users that have solved a given problem and average time taken to solve that problem. Scoring strategy for a problem could simply be to award the score assigned for the problem or could be something different like a combination of score and time. Return the current leader of the contest Users should be able to get curations like Top 10 most liked problems of a certain tag. Extension Problem

On solving a problem, users should get a recommendation of top 5 problems based on relevance The recommendation strategy for problems could simply be similar tags or extensible to include other factors like number of users who have solved a particular problem or a combination of factors ( Design should be extensible). Capabilities

Below are various functions that should be supported with necessary parameters passed. These are just suggestions, the signatures can be altered as long as the functionalities are provided.

Registering a problem - addProblem() Registering a user - addUser() Fetch the list of problems - fetchProblems() - Should take as input filtering and sorting criterias and return all matching problems in the right order. The result should contain problem attributes like name, tag, difficulty level, score etc. Should also display number of users who have solved a problem and the average time taken for that problem Solve a problem - solve() - Exposed to a contestant to mark a problem as solved [ For the extension problem, this function should return next 5 recommended problems ] Fetch solved problems for a user - fetchSolvedProblems() - Fetch the list of solved problems for a user Get leader - getLeader() - Returns the name and department of the leader Get top n liked problems of a certain tag - getTopNProblems() Guidelines

You should store the data in-memory using a language-specific data-structure. Implement clear separation between your data layers and service layers. Simple and basic function are expected as entry point - no marks for providing fancy * restful API or framework implementation Because this is a machine coding round, heavy focus would be given on data modeling, code quality etc, candidate should not focus too much time on algo which compromises with implementation time Expectations:

Your code should cover all the mandatory functionalities explained above. Your code should be executable and clean. Your code should be properly refactored, and exceptions should be gracefully handled. Appropriate errors should be displayed on the console How will you be evaluated?

Code Should be working Code readability and testability Separation Of Concerns Abstraction Object-Oriented concepts. Language proficiency. Scalability

Phonepe | Backend SDE |5-7 YOE| Machine Coding Question
phonepe logo
Phonepe
Backend SDE
March 30, 20254 reads

Summary

This post describes a machine coding interview question for a Backend SDE role at PhonePe, detailing the requirements for building a customer support issue resolution system.

Full Experience

PhonePe processes a vast number of transactions every day, wherein some transactions may fail (enter a FAILED state) or remain in a PENDING state due to various reasons such as bank or NPCI issues, or internal PhonePe errors. To handle such cases efficiently, a resolution system is needed, where customers can log their unsuccessful transactions and raise complaints against them. The system must categorize customer issues into several types, such as payment-related, mutual fund-related, gold-related, or insurance-related. Different customer service agents will have their specific expertise based on the issue type, whom the system will assign the issues by marking them waiting in case all agents are busy.

The customer service agents can work on one issue at a time and update its status, and once it is resolved, the agent will receive another issue.

The solution should incorporate the following features:

Customers can log a complaint against any unsuccessful transaction. Customer Service Agents can search for customer issues with issue ID or customer details (email). Agents can view their assigned issues and mark them resolved once they are resolved. System should assign the issue to agents based on an assigning strategy. System should allow the admin to onboard new agents. System should allow the admin to view the agent's work history. Implementation requirements Your solution should implement the following functions. Feel free to use the representation for objects you deem fit for the problem and the provided use cases. The functions are ordered in the decreasing order of importance (highest to lowest). We understand that you may not be able to complete the implementation for all the functions listed here. So try to implement them in the order in which they are declared down below.

createIssue(transactionId, issueType, subject, description, email) addAgent(agentEmail, agentName ,List) assignIssue(issueId) // -> Issue can be assigned to the agents based on different strategies. For now, assign to any one of the free agents. getIssues(filter) // -> issues against the provided filter updateIssue(issueId, status, resolution) resolveIssue(issueId, resolution) viewAgentsWorkHistory() // -> a list of issue which agents worked on Example:

createIssue("T1", "Payment Related", "Payment Failed", "My payment failed but money is debited", “testUser1@test.com”);

Issue I1 created against transaction "T1"

createIssue("T2", "Mutual Fund Related", "Purchase Failed", "Unable to purchase Mutual Fund", “testUser2@test.com”);

Issue I2 created against transaction "T2"

createIssue("T3", "Payment Related", "Payment Failed", "My payment failed but money is debited", , “testUser2@test.com”);

Issue I3 created against transaction "T3"

addAgent(“agent1@test.com”, “Agent 1”, Arrays.asList("Payment Related", "Gold Related"));

Agent A1 created

addAgent(“agent2@test.com”, “Agent 2”, Arrays.asList("Mutual Fund Related"));

Agent A2 created

assignIssue("I1")

Issue I1 assigned to agent A1

assignIssue("I2")

Issue I2 assigned to agent A2

assignIssue("I3")

Issue I3 added to waitlist of Agent A1

getIssue({"email": "testUser2@test.com"});

I2 {"T2", "Mutual Fund Related", "Purchase Failed", "Unable to purchase Mutual Fund", "testUser2@test.com", "Open"}, I3 {"T3", "Payment Related", "Payment Failed", "My payment failed but money is debited", , "testUser2@test.com", "Open"}

getIssue({"type": "Payment Related"});

I1{"T1", "Payment Related", "Payment Failed", "My payment failed but money is debited", "testUser1@test.com", "Open"}, I3 {"T3", "Payment Related", "Payment Failed", "My payment failed but money is debited", "testUser1@test.com", "Open"}

updateIssue("I3", "In Progress", "Waiting for payment confirmation");

I3 status updated to In Progress

resolveIssue("I3", "PaymentFailed debited amount will get reversed");

I3 issue marked resolved

viewAgentsWorkHistory()

A1 -> {I1, I3}, A2 -> {I2} Things to keep in mind

Programming Language & Environment: You can use the programming language of their choice to implement the solution. Free to use any local IDEs, such as IntelliJ, or the CodeSignal platform for writing code. Scope of Implementation: Use of REST APIs is not required; implementing equivalent functions for the functional requirements is sufficient. Data Persistence: Persistence should be achieved using in-memory data structures (e.g., Lists, Queues, Maps), and no connection to databases is needed. Third-Party Libraries: It is recommended to refrain from using third-party libraries like Guava or Hystrix for functional requirements. Demonstrating Functionality: There is no need to handle command-line inputs, inputs can be hardcoded within a driver class. A main() class or driver or test cases that simulates the functional requirements is sufficient. Ambiguity in Problem Statement: If there is any ambiguity in the problem statement, you can make reasonable assumptions and proceed with the solution. These assumptions should be clearly called out in comments within the code for them to be discussed in evaluation round. Submission Guidelines: You must zip your solution files and email them to the provided email address (Email address must be available in Interview Invite Link). This must be done even if you choose to code on Code signal Platform. Please ensure you submit your solution on time even if it is incomplete. A partial solution submitted on time is better than a complete solution submitted after time. Evaluation Criteria

Completeness of functional requirements Application of OO design principles Code efficiency Code readability and maintainability Testability Handling corner cases Language proficiency Time Duration You will have 1.5 hours to submit your solution to this problem statement.

[execution time limit] 4 seconds (sh)

[memory limit] 2g

Interview Questions (1)

Q1
Customer Support Issue Resolution System
System DesignHard

Design and implement a customer support issue resolution system for PhonePe. The system should handle customer complaints against unsuccessful transactions, categorize issues, assign them to specialized customer service agents, allow agents to update/resolve issues, and enable admin functions like onboarding agents and viewing work history.

Functional requirements include:

  • Customers logging complaints (createIssue).
  • Agents searching for issues (getIssues).
  • Agents viewing and resolving assigned issues (assignIssue, updateIssue, resolveIssue).
  • Admin functions (addAgent, viewAgentsWorkHistory).

Implementation should use in-memory data structures, avoid third-party libraries, and focus on OOP principles, efficiency, readability, and testability. The problem includes a detailed example of interactions.

Phonepe | Backend SDE | 3 YOE | Interview
phonepe logo
Phonepe
Backend SDE3 years
March 29, 20253 reads

Summary

I interviewed for a Backend SDE role at Phonepe, completing rounds in machine coding, data structures/algorithms, high-level design, and hiring manager discussion, and was ultimately selected for the position.

Full Experience

Round 1: Machine coding

1.5 hrs

1. Handle multiple communication request types (Email, SMS, Soundbox, etc.).

2. Different request types have different mandatory input fields (e.g., Email: sender, receiver, subject, message; SMS: mobile number, message)

3. Providers can support one or multiple channels; multiple providers per channel allowed.

4. Each provider can have multiple accounts, segregated for better handling (e.g., critical OTP communication).

5. Randomly select one active provider from eligible providers for each request.

Round 2: PS/DS

1)https://leetcode.com/problems/remove-k-digits/description/

2)https://codeforces.com/problemset/problem/1037/D

Round 3: HLD

Design Instagram

Note: For feed publishing and fetching, Interviewer didn't agree with Message queue approach as it is not scalable for billions of users.

Round 4: HM

Project discussion

Verdict: Selected

Compensation: https://leetcode.com/discuss/post/6592499/phonepe-backend-sde-3-yoe-offer-by-anony-cpxy/

Interview Questions (5)

Q1
Machine Coding: Handle Multiple Communication Request Types
Data Structures & Algorithms

1. Handle multiple communication request types (Email, SMS, Soundbox, etc.).

2. Different request types have different mandatory input fields (e.g., Email: sender, receiver, subject, message; SMS: mobile number, message)

3. Providers can support one or multiple channels; multiple providers per channel allowed.

4. Each provider can have multiple accounts, segregated for better handling (e.g., critical OTP communication).

5. Randomly select one active provider from eligible providers for each request.

Q2
Remove K Digits
Data Structures & Algorithms
Q3
D. Labyrinth
Data Structures & Algorithms
Q4
Design Instagram
System DesignHard

Design Instagram

Note: For feed publishing and fetching, Interviewer didn't agree with Message queue approach as it is not scalable for billions of users.

Q5
Project discussion
Behavioral

Project discussion

PhonePe | Sr. SDE | 6.5 YOE | Interview questions
phonepe logo
Phonepe
Sr. SDE6.5 years
September 15, 202434 reads

Summary

I interviewed for a Senior SDE position at PhonePe, where I encountered a challenging machine coding task involving the design of a configurable workflow system, followed by a system design round focused on a scalable notification service.

Full Experience

I recently interviewed for a Senior SDE role at PhonePe. The interview process included a Machine Coding Round and a System Design Round.

Machine Coding Round

This round started with the recruiter sharing a Google Meet invite. Once I joined, they announced the question and instructed us to email our solution as a zip file to HR. We were allowed to leave the call once we fully understood the question, and it seemed acceptable to take slightly more than the allotted two hours to submit.

The problem involved designing a system where multiple workflows could be configured. Users perform various actions in the PhonePe app, such as signing up, logging in, checking offers, recharging, or making UPI transfers. A workflow consists of several stages; for instance, an "onboarding workflow" might progress through stages like "KYC pending," "Verified user (with first payment pending)," "First payment complete," and "Eligible for a new user coupon."

Workflows are represented as directed graphs where each node is a stage. As a user performs actions, they transition between stages. For example, completing KYC would update the user’s stage from "KYC pending" to "Verified user (first payment pending)." Some stages could have multiple next stages, depending on the user’s action. The system had to support multiple workflows, and a single stage could appear in several. When the service received an action, it needed to update the stages of all workflows the user was part of and check for new workflows the user could onboard into.

The task emphasized implementing production-grade code, requiring classes for workflows, stages (considering singleton patterns), different action types (following SOLID principles), and a service layer for business logic. After submitting my solution, a follow-up call was scheduled to explain it to the panel.

System Design Round

The system design challenge was to architect a notification service capable of sending email, SMS, and push notifications. A key requirement was handling varying delays for different notification types and ensuring dynamic scalability for specific notification categories.

Interview Questions (2)

Q1
Design Configurable Workflow System
Data Structures & AlgorithmsHard

The task was to design a system where multiple workflows could be configured for users performing various actions in the PhonePe app (e.g., signing up, logging in, checking offers, recharging, UPI transfers). A workflow consists of several stages. For example, an "onboarding workflow" could have stages like:

  1. KYC pending
  2. Verified user (with first payment pending)
  3. First payment complete
  4. Eligible for a new user coupon

The workflow can be represented as a directed graph, where each node is a stage. As a user performs actions, they move from one stage to another in the workflow. For example, after "completing KYC," the app would send this action to the service, updating the user’s stage from "KYC pending" to "Verified user (first payment pending)."

Some stages may have multiple next stages, determined by the user's action. There can be multiple workflows in the system, and a specific stage might appear in several workflows. When the service receives an action, it must update the stages of all workflows the user is part of. Additionally, the system should check for workflows the user can onboard into due to their actions.

The task required implementing production-grade code, including:

  • Workflow and stage classes (considering singleton patterns, etc.)
  • Classes for different action types (following SOLID principles)
  • A service layer to handle all business logic
Q2
Design Notification Service
System DesignHard

The task was to design a notification service that supports sending email, SMS, and push notifications. Different types of notifications may have varying delays. The system needed to scale dynamically for specific types of notifications.

Preparation Tips

For those curious about how I prepared, I focused on a strategy that I've previously outlined. You can find more details on my approach to interview preparation, specifically for companies like Google, in my blog post here.

PhonePe | Software Engineer - Android | 3+ years
phonepe logo
Phonepe
Software Engineer - AndroidBangalore3 yearsOffer
July 27, 202429 reads

Summary

I successfully interviewed for a Software Engineer - Android role at PhonePe in Bangalore, which involved an online assessment, two technical rounds focusing on DSA and Android, a machine coding round, and a hiring manager discussion, ultimately leading to an offer.

Full Experience

I had a comprehensive interview experience for the Software Engineer - Android position at PhonePe, spread across five distinct rounds.

Round 1: Online Assessment
This round was an hour-long online test. It comprised 10 Android Multiple Choice Questions (MCQs) and one Data Structures & Algorithms (DSA) question, which was of medium difficulty.

Round 2: Problem Solving/Data Structures
Originally scheduled for an hour, this round extended to 1 hour and 30 minutes. I was presented with two LeetCode medium-level questions, primarily revolving around Graphs and Arrays. I was expected to write fully functional code, test it with various inputs, and finally discuss the time complexities of my solutions.

Round 3: Platform (Android)
This one-hour round began with basic introductions. Following that, the discussion delved deeply into all major Android components, covering their functionalities and interconnections.

Round 4: Machine Coding
For this 1 hour 30-minute machine coding round, an online platform link was shared. The core task was to design a utility function for an Android application to synchronize contacts between the device and the backend. I initiated by asking clarifying questions and outlining the assumptions I would make. I was expected to structure different Android layers and define models necessary for API calls. After completing the basic implementation, the interviewer presented several subtasks, such as managing contacts for multiple devices for a single user, which I then had to address.

Round 5: Hiring Manager
The final round, lasting an hour, started with introductions and a thorough walkthrough of my resume. The interviewer then inquired about challenges I had faced in my previous jobs. Following this, they picked up on some Android technical terms I had used and conducted a deep dive into those topics for about 30 minutes. Subsequently, the interview shifted towards behavioral questions, focusing on my ideal team, issues I might encounter in my current team and company, and strategies for resolving such problems.

A few days after the final round, I was informed of my selection, and the offer discussion took place a week later.

Interview Questions (3)

Q1
Android Contacts Sync Utility Design
System Design

Design a utility function for an Android app to sync contacts in the device with the backend. This involved clarifying requirements, listing assumptions, writing different Android layers, defining models for API calls, and handling subtasks such as managing contacts for multiple devices for a single user.

Q2
Challenges Faced in Previous Roles
Behavioral

Describe challenges I faced in my previous jobs and how I addressed them.

Q3
Ideal Team and Conflict Resolution
Behavioral

Discuss the ideal team I desire, issues I face in my current team and company, and how to resolve them.

PhonePe Interview SDE-2 Experience
phonepe logo
Phonepe
SDE-2Offer
June 11, 202433 reads

Summary

I recently interviewed for the SDE-2 role at PhonePe and was selected. The process involved machine coding, DSA/problem-solving, system design, and hiring manager rounds. Despite challenges with an unprofessional recruiter, I received an offer.

Full Experience

My PhonePe SDE-2 Interview Experience

Hi everyone, I wanted to share my recent interview experience for the SDE-2 position at PhonePe. The overall process was quite comprehensive, although my interaction with the recruiter was less than ideal. She was unprofessional, frequently canceled meetings without informing me promptly, and often scheduled interviews on different days than requested. I often had to call back after each round to schedule the next one, which was frustrating.

Round 1: Machine Coding Round

For the first round, I was given a problem and had 24 hours to complete it. The problem was the classic Snake and Ladder game. I successfully completed this round.

Round 2: DSA/Problem Solving

This round consisted of two problems. The first involved some mathematical calculations, while the second was similar to problems that require equalizing all elements in an array through various operations.

Round 3: System Design

This round was focused on system design, where I was tasked with designing a Subscription Management System. I discussed various aspects of designing such a system, including handling recurring payments, plan changes, cancellations, and notifications.

Round 4: Hiring Manager (HM) Round

The final round was with the hiring manager. This round focused on my past projects, behavioral questions, and situation-based scenarios.

Despite the initial struggles with the recruitment process, I received positive feedback from all rounds and eventually got the 'Selected' verdict!

Interview Questions (3)

Q1
Snake and Ladder Problem
Data Structures & Algorithms

For the machine coding round, I was given the complete problem statement for the classic Snake and Ladder game and had 24 hours to implement a solution.

Q2
Equalize All Array Elements
Data Structures & Algorithms

In the DSA/Problem Solving round, one of the problems asked was similar to equalizing all elements in an array. This typically involves finding the minimum operations to make all elements the same, often related to finding a median or average.

Q3
Design Subscription Management System
System Design

For the system design round, I was asked to design a comprehensive Subscription Management System. This included aspects like handling recurring payments, managing different subscription plans, user upgrades/downgrades, cancellations, and notification systems.

Interview at PhonePe
phonepe logo
Phonepe
Ongoing
May 29, 202425 reads

Summary

I recently completed a four-round interview process at PhonePe, which included Machine Coding, DSA/PS, System Design, and a Hiring Manager round. All rounds received positive feedback, and I am currently awaiting the final offer decision.

Full Experience

Round 1: Machine Coding

For the first round, I was given a Machine Coding problem and had 24 hours to complete it. I plan to share the specific details of this problem once all my interview rounds are fully completed.

Round 2: Data Structures & Algorithms (DSA/Problem Solving)

This round consisted of two problem-solving questions. The first problem involved some mathematical calculations. The second problem was similar to the concept of 'equalizing all array elements'.

Round 3: System Design

The third round was a System Design interview. After a few reschedules, an interviewer finally joined, and I was tasked with designing a 'subscription management service'. Initially, the result for this round was pending, but I later received positive feedback for it.

Round 4: Hiring Manager Round

My final round was with a Hiring Manager. The outcome for this round was also pending for some time, but I eventually received positive feedback from the recruiter.

Overall, all my interview rounds received positive feedback, and I am now waiting for the final decision regarding an offer.

Interview Questions (1)

Q1
Design Subscription Management Service
System Design

Design a comprehensive subscription management service. This typically involves handling user subscriptions, different tiers or plans, recurring billing cycles, cancellation flows, renewal processes, and potentially handling payment integration aspects.

PhonePe Software Developer Engineer(SDE) Interview Experience
phonepe logo
Phonepe
Software Developer Engineer(SDE)2 yearsOn Hold
May 24, 202424 reads

Summary

I interviewed for a Software Developer Engineer (SDE) position at PhonePe, completing three rounds and receiving a positive initial response. However, due to a miscommunication about my other offers, I was subsequently put on hold for the role.

Full Experience

I received an email from an HR for an SDE opening at PhonePe, which included the job description and the interview process details. I have 2 years of experience.

Round 1: Machine Coding Round

In this round, I was given a problem and had 90 minutes to submit the code. I could use my personal IDE or the one provided by the interviewer. The question involved designing the backend for an interactive hackathon platform. The focus was on data modeling, code quality, and implementing mandatory functionalities to manage problems, contestants, scores, and leaders, with an extension to show problem-solving statistics.

Round 2: DSA and CS Concepts

This round focused on Data Structures & Algorithms and Computer Science concepts. One question involved using a Trie data structure. Given an array of strings and a search key, I needed to return the top 3 matching strings that started with the search key. I don't recall the other problem, but it was an easy LeetCode type question.

Round 3: Hiring Manager Round

This final round was a discussion primarily centered around my previous projects and experience.

The entire process was completed within two weeks, and I received a positive response. I got a call from HR to discuss compensation, but that call never materialized. This happened because I mentioned I was also awaiting compensation numbers from Adobe, which in retrospect, was a mistake. After 3-4 days, when I contacted them again, I was informed that due to internal movements to fill the requirement, I was being put on hold for the position.

Interview Questions (2)

Q1
Hackathon Platform Backend Design
System Design

PhonePe is conducting its annual hackathon and wants to create an interactive platform to host the event. It will be a 2-day event, and contestants need to maximize their score over this period by either solving more problems or more difficult problems. Design the backend to support this platform.

Mandatory Functionalities

  • The system should have the capability to add problems to the Questions Library.
  • Contestants should be able to register themselves with their name and their department name.
  • A problem should have attributes like description, tag, difficulty level (easy, medium, hard), score.
  • Contestants should be able to filter problems based on difficulty level or tags and sort them based on score (design should be extensible to other attributes).
  • A contestant should be able to solve a problem as well as get the list of problems solved by him/her.
  • Scoring strategy for a problem could simply be to award the score assigned for the problem or could be something different like a combination of score and time.
  • Return the current leader of the contest.

Extension Problem

  • A contestant should be able to see the number of users that have solved a given problem and average time taken to solve that problem.

Capabilities (Suggested Functions)

  • addProblem()
  • addUser()
  • fetchProblems() - Should take as input filtering and sorting criteria and return all matching problems in the right order. The result should contain problem attributes like name, tag, difficulty level, score etc. (For the extension problem, number of users who have solved a problem and the average time taken for that problem should also be displayed here).
  • solve() - Exposed to a contestant to mark a problem as solved.
  • fetchSolvedProblems() - Fetch the list of solved problems for a user.
  • getLeader() - Returns the name and department of the leader.

Guidelines

  • You should store the data in-memory using a language-specific data-structure.
  • Implement clear separation between your data layers and service layers.
  • Simple and basic functions are expected as entry point - no marks for providing fancy RESTful API or framework implementation.
  • Because this is a machine coding round, heavy focus would be given on data modeling, code quality etc. Candidates should not focus too much time on algorithms which compromises with implementation time.
Q2
Trie for Top 3 String Suggestions
Data Structures & AlgorithmsMedium

Given an array of strings and a search key, design a solution using a Trie data structure to return the top 3 matching strings that start with the search key.

PhonePe | SDE 2 (3-5 Years) | Bangalore | Aug 2023 [Reject]
phonepe logo
Phonepe
sde 2bangalore3 yearsRejected
August 16, 202327 reads

Summary

I interviewed for the SDE 2 role at PhonePe in August 2023 and went through Machine Coding, Problem Solving, and System Design rounds. Despite positive feedback, I was surprisingly rejected after these rounds.

Full Experience

I recently interviewed for an SDE 2 position at PhonePe in Bangalore in August 2023. The interview process consisted of three rounds: Machine Coding, Problem Solving/Data Structures, and System Design. I felt I performed well in all rounds and received good feedback, but was unexpectedly rejected before reaching the Hiring Manager round. I hope sharing my experience can help others.

Interview Questions (4)

Q1
Design Order Management System
System Design

Design and implement an Order Management System for Flipkart.

Q2
Remove K Digits
Data Structures & AlgorithmsMedium

Given a non-negative integer num represented as a string, remove k digits from the number so that the new number is the smallest possible. Return the new number represented as a string.

Q3
Collect All Treasures in Matrix
Data Structures & Algorithms

Find if we can cover all given treasures in a matrix of m x n with values:

  • 0 : Open position
  • 1 : Treasure
  • -1: Wall [Blocked position]

We will be given a coordinate of where to start and it will always be a valid position. The follow up was to produce the minimum path to collect all these treasures if possible, which I wasn't able to achieve.

Q4
Malicious URL Detection System
System Design

The problem was presented as a feature use-case in existing product. We have an in-house browser [like Chrome, FireFox] to serve customers, and a data analytics team. Data analytics team frequently produces files with list of websites that are malicious and should not be visited due to security concerns. We need to build a System to consume and process the data from data analystics team, and let the browser know if a website is malicious or not for any given URL.

PhonePe | SDE-1 | Bangalore | Aug 2022 | Selected
phonepe logo
Phonepe
SDE-1BangaloreOffer
February 25, 202325 reads

Summary

I was selected for the SDE-1 role at PhonePe after a rigorous four-round interview process held in Bangalore in August 2022, which included multiple challenging coding rounds, in-depth technical discussions on DSA and system design, and a final HR-technical evaluation.

Full Experience

I had a comprehensive interview experience with PhonePe for the SDE-1 role, which started with an offline campus visit to PEC – Chandigarh in August 2022. The entire process consisted of four challenging rounds.

The first round was an Online Test of 90 minutes on the DoSelect platform, featuring four hard-level coding questions. I faced problems similar to Split Array Largest Sum and a variation of Flower Planting With No Adjacent involving minimum cost. There was also a challenging DP problem about maximizing people passing a test based on scores and bounds, and a unique array permutation problem defining "sadness." I managed to pass 7 out of 10 test cases for the first two and attempted the others. Out of 181 eligible candidates, 18 were shortlisted.

The second round was a Technical Round lasting 60 minutes. After my introduction, the two interviewers focused on DSA. I solved Amount of Time for Binary Tree to Be Infected by explaining both BFS and DFS approaches, writing pseudocode for BFS, and implementing DFS. For Sum of Subarray Minimums, I initially gave a brute-force O(N^2) solution, then optimized it to O(N) using a stack, correcting my code after the interviewer pointed out edge cases. Both interviewers were satisfied. 11 candidates proceeded to the next round.

The third Technical Round also lasted 60 minutes and immediately delved into DSA. I explained the recursive (brute force) approach for Generate Parentheses to the interviewer's satisfaction. For Burst Balloons, I fully explained the DP approach, including the state definition dp[i][j], but couldn't write the complete code, yet the interviewer was content with my explanation. Finally, for Optimize Water Distribution in a Village, I proposed an MST approach for pipes and a power set for wells. When prompted for optimization, I received a hint from the interviewer that enabled me to explain the complete optimal solution. 5 candidates were shortlisted for the final round.

The fourth and final round was a 70-minute HR + Technical Round. It began with company-specific HR questions such as "Why PhonePe?", "Why not Google/Amazon?", and "What made me choose PhonePe?". Following this, we had an in-depth discussion about my E-Commerce Web Application project, which I built using Django REST Framework. I confidently answered all project-related questions. Then, I was given a puzzle: "Find the faster rat among 12 rats using 4 cakes." This was followed by variations, including finding the faster rat among 16 rats and determining the maximum number of rats for which the faster one could be found using 4 cakes. I came up with a solution for up to 36 rats and indicated the answer would be in the 36-48 range. I was also asked CS fundamentals questions like the "Difference between Stack and Heap memory," "Inheritance," "Virtual functions and classes in C++," and "Deadlock conditions and scenarios." I admitted I wasn't prepared for DBMS questions when asked. The round concluded with a system design problem: "Design a system for a single lift with 1000 building floors." After explaining my approach, the problem was extended to "design for 3 lifts" and identify suitable data structures. My initial approach using maps and different classes was not satisfactory, but I revised it using virtual classes and maps, which was accepted.

Ultimately, I was one of 4 candidates selected, marking a significant achievement for me, especially after not securing an internship and getting a placement on the first day of the placement cycle. I'm thrilled to give back to the community!

Interview Questions (18)

Q1
Split Array Largest Sum
Data Structures & AlgorithmsHard

The logic of the problem was the same as this problem, but the question language was difficult to interpret.

Q2
Flower Planting With No Adjacent (Variation)
Data Structures & AlgorithmsHard

A variation of this problem was given where I needed to print the color of each node from 4 given colors. The cost of each color was also provided, and the objective was to color the graph with minimum cost.

Q3
Max People Pass Test with Score & Bound
Data Structures & AlgorithmsHard

Given N people and two arrays: one of Scores and one of Bounds on N people. The initial score to pass a certain test was 0. A person is considered to pass if their score is greater than a variable score. After passing, their score value is not considered, and their bound value gets added to the score. The task was to calculate the maximum number of people that can pass the test.

Q4
Most Sad Array Pair
Data Structures & AlgorithmsHard

Given two arrays A and B, where B is a permutation of array A. Sadness is defined as the most jumbled permutation of array A. For example, if A: 1 3 2 2 and B: 1 2 3 2, this is not the maximally sad array pair, as the most sad would be 2 2 3 1. The task was to return if array B is the most sad array possible.

Q5
Amount of Time for Binary Tree to Be Infected
Data Structures & AlgorithmsMedium

Given a binary tree, determine the amount of time required for the entire tree to be infected, starting from a given node.

Q6
Sum of Subarray Minimums
Data Structures & AlgorithmsMedium

Given an array of integers A, find the sum of min(B) for every contiguous subarray B of A. Since the answer may be large, return the answer modulo 10^9 + 7.

Q7
Generate Parentheses
Data Structures & AlgorithmsMedium

Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.

Q8
Burst Balloons
Data Structures & AlgorithmsHard

Given n balloons, indexed from 0 to n-1. Each balloon has a number written on it. If you burst balloon i, you will get nums[left] * nums[i] * nums[right] coins. Design an algorithm to find the maximum coins you can collect by bursting the balloons.

Q9
Optimize Water Distribution in a Village
Data Structures & AlgorithmsHard

There are n houses and some wells in a village. You want to supply water to all the houses. You can either build a well in a house or connect two houses directly. Design an algorithm to find the minimum total cost to supply water to all houses.

Q10
Find Faster Rat (Puzzle)
Other

You have 12 rats. One rat eats faster than the other 11 (and the other 11 eat at an identical pace). You have 4 cakes (which the rats do want to eat). You can put as many rats on a cake as you want at a time, and you can use as many cakes at a time as you want. Give a way to find the faster rat.

Q11
Find Faster Rat (Puzzle - 16 Rats)
Other

The puzzle remains the same, but you are given 16 rats instead of 12.

Q12
Max Rats for Faster Rat Puzzle (4 Cakes)
Other

Determine the maximum number of rats from which we can find the faster rat using 4 cakes.

Q13
Stack vs Heap Memory
Other

Explain the difference between Stack memory and Heap memory.

Q14
What is Inheritance?
Other

Explain what inheritance is.

Q15
Virtual Function and Class in C++
Other

Explain what a virtual function and virtual class in C++ are, along with their applications.

Q16
Deadlock (OS)
Other

Explain what deadlock is, the conditions required for deadlock, and a general scenario where deadlock may occur.

Q17
Design a Single Lift System
System Design

Design a system for a single lift in a building with 1000 floors.

Q18
Design a Multiple Lift System (3 Lifts)
System Design

Extend the single lift system design to accommodate 3 lifts, and specify which data structures would be used for the implementation.

Preparation Tips

My preparation primarily focused on Data Structures and Algorithms, practicing a variety of problems to optimize solutions. For the HR + Technical round, I also researched company-specific questions and prepared to discuss my projects in detail. I refreshed my knowledge of core CS subjects like Operating Systems and Object-Oriented Programming concepts but admittedly had not prepared for DBMS topics.

PhonePe interview experience No offer
phonepe logo
Phonepe
Senior SDEpune7 yearsNo Offer
July 9, 202219 reads

Summary

I interviewed for a Senior SDE position at PhonePe, navigating through machine coding, system design, problem-solving, and hiring manager rounds. Despite a strong performance in most stages, I ultimately did not receive an offer.

Full Experience

I recently interviewed for a Senior Software Development Engineer position at PhonePe. My journey began with a call from a consultant, leading me into a multi-round interview process.

My first round was a Machine Coding challenge. I was tasked with creating a cab management system, with a strong emphasis on design principles and modular coding. This round involved an hour-long discussion.

The next day, I received positive feedback that I had cleared the machine coding round and was invited for a System Design interview. In this round, I first had to explain my current project. Following that, I was asked to design a distributed ID generator capable of handling 1 million requests per day. Luckily, I had previously practiced this specific problem during mock interviews, even referencing a resource (link). I walked them through the features list, back-of-the-envelope estimations, and discussed potential concerns and issues. Topics like virtual nodes, partitioning issues, and consistent hashing were also part of the conversation.

Two days later, I got feedback that I was moving to the Problem Solving round. The first problem given was Rotting Oranges. I coded this completely, focusing on modularity, and achieved an optimized time and space complexity. The second problem was Longest Valid Parentheses, which I solved using a stack and in optimized time, explaining my approach with pseudocode. In the last 5-10 minutes, I was given Daily Temperatures. I explained a brute force approach but struggled to arrive at an O(n) solution within the remaining time.

After that, I was scheduled for the Hiring Manager round within 2-3 days. The hiring manager was a very experienced individual. He primarily inquired about my current project and daily work. He then presented a simple design problem: how to design search functionality, asking questions about estimations and suitable technologies.

I was hopeful for a positive outcome, but I was informed by the consultant that they wished for one more PS or System Design round (the exact round wasn't clear as HR conveyed this personally to the consultant). I was ready for it, but the very next day, I received an email stating that they had decided not to move forward with my candidacy. I didn't receive any proper feedback. However, I must say that the interviewing staff was good, and the quality of the interviews was high.

Interview Questions (6)

Q1
Cab Management System Design
Other

Design and implement a cab management system, focusing on design principles and modular coding. This involved an hour-long discussion on the design and implementation aspects.

Q2
Design a Distributed ID Generator
System DesignHard

Design a distributed unique ID generator capable of handling 1 million requests per day. The discussion included exploring features, conducting back-of-the-envelope estimations, and addressing potential concerns and issues. Specific topics like virtual nodes, partitioning issues, and consistent hashing were also covered.

Q3
Rotting Oranges
Data Structures & AlgorithmsMedium

You are given an m x n grid where each cell can have one of three values: 0 representing an empty cell, 1 representing a fresh orange, or 2 representing a rotten orange. Every minute, any fresh orange that is 4-directionally adjacent to a rotten orange becomes rotten. Return the minimum number of minutes that must elapse until no fresh oranges are present in the grid. If this is impossible, return -1.

Q4
Longest Valid Parentheses
Data Structures & AlgorithmsHard

Given a string containing just the characters '(' and ')', return the length of the longest valid (well-formed) parentheses substring.

Q5
Daily Temperatures
Data Structures & AlgorithmsMedium

Given an array of integers temperatures represents the daily temperatures, return an array answer such that answer[i] is the number of days you have to wait after the ith day to get a warmer temperature. If there is no future day for which this is possible, keep answer[i] == 0 instead.

Q6
Design Search Functionality
System Design

Design a search functionality for a system, discussing various aspects such as estimations and appropriate technologies.

Preparation Tips

My preparation involved practicing system design questions in mock interviews, which proved highly beneficial for the distributed ID generator problem. For coding rounds, I focused on practicing problems from platforms like LeetCode.

Phonepe | Software Engineer | Pune [Accpeted]
phonepe logo
Phonepe
Software EngineerPune2 yearsOffer
February 22, 202225 reads

Summary

I successfully interviewed for a Software Engineer role at Phonepe in Pune and received an offer. The process involved an online coding assessment, a problem-solving round focused on DSA, and a hiring manager discussion covering projects, system design, and OOPs concepts.

Full Experience

I recently interviewed for a Software Engineer position at Phonepe in Pune, and I'm thrilled to share that I received an offer!

The interview process consisted of three rounds:

  1. Online Coding Assessment: This round was conducted on the CodeSignal platform. The questions were similar to those mentioned in this LeetCode post. I was able to successfully solve all the problems.
  2. Problem Solving/Data Structure Round (1 - 1.5 hours): I interviewed with a senior software developer at Phonepe. The interviewer was very supportive and provided helpful hints whenever I encountered a roadblock. It was crucial to grasp these hints to progress towards the solution. The questions I was asked were related to classic LeetCode problems.
  3. Hiring Manager Round (1.5 hours): My interviewer was an engineering manager. The round began with introductions, followed by a detailed discussion about my current company's projects. We then delved into designing e-commerce websites, similar to Flipkart or Amazon. Finally, I was asked several Java-based questions focusing on OOPs concepts.

Overall, the interview process was extremely smooth. I received an update about my interview schedule approximately three weeks after completing the online assessment. All subsequent rounds were conducted on the same day, and I received the results the very next day.

Interview Questions (3)

Q1
Best Time to Buy and Sell Stock
Data Structures & Algorithms

You are given an array prices where prices[i] is the price of a given stock on the ith day. You want to maximize your profit by choosing a single day to buy one stock and choosing a different day in the future to sell that stock. Return the maximum profit you can achieve from this transaction. If you cannot achieve any profit, return 0.

Q2
Best Time to Buy and Sell Stock III
Data Structures & Algorithms

You are given an array prices for which prices[i] is the price of a given stock on the ith day. Find the maximum profit you can achieve. You may complete at most two transactions.

Q3
Search a 2D Matrix
Data Structures & Algorithms

Write an efficient algorithm that searches for a target value in an m x n integer matrix. This matrix has the following properties: Integers in each row are sorted in ascending order from left to right. The first integer of each row is greater than the last integer of the previous row.

Preparation Tips

For the Data Structures and Algorithms (DSA) rounds, I focused on medium-hard level problems, particularly those involving Dynamic Programming (DP). It's also critical to articulate the time complexity of each solution you propose.

For the Hiring Manager round, I made sure to have a thorough understanding of the projects I was working on at my previous company.

Phonepe | Fresher | India | October 2021 | Rejected
phonepe logo
Phonepe
fresherindia0.5 yearsRejected
November 7, 202121 reads

Summary

I had an off-campus problem-solving interview at Phonepe for a fresher role. Despite a positive interaction with the interviewer, I found the questions challenging and was ultimately rejected after not fully solving multiple problems.

Full Experience

I had an off-campus problem-solving interview at Phonepe. The overall experience was quite pleasant, and the interviewer was very supportive. We began with standard introductions before diving into the technical questions. I was presented with three distinct problems. The first involved optimizing a restaurant's dish selection based on quality and price, which I couldn't fully solve; I later realized it was a variation of the Longest Increasing Subsequence problem, requiring a specific sorting approach. The second question was conceptually very similar to the LeetCode problem: Minimum Speed to Arrive on Time. For the third question, a dynamic programming challenge about a rabbit maximizing points with limited jumps, I struggled particularly with efficiently tracking the maximum value within a moving window of size k. The interviewer eventually hinted at using a deque for this. Given that I only managed to solve about one and a half questions to their satisfaction, I anticipated not receiving a call back.

Interview Questions (3)

Q1
Restaurant Dish Selection with Quality and Price
Data Structures & Algorithms

There is a restaurant and restaurant serves n dishes, each dish has a quality and a price. A dish is considered better if the quality and price of it is higher than other dish. Given n dishes find minimum number of changes in quality remove the above condition for any pair of dish.

Q2
Minimum Speed to Arrive on Time Concept
Data Structures & AlgorithmsMedium

The question was conceptually very much related to the LeetCode problem: Minimum Speed to Arrive on Time.

Q3
Rabbit Jumps for Maximum Points
Data Structures & AlgorithmsMedium

The question was related to finding the maximum number of points a rabbit can make while reaching the end of an array, provided a maximum number of jumps k it can hop. This was a dynamic programming problem, but the main discussion revolved around efficiently tracking the maximum value within a moving window of size k. Specifically, to reach index i, one can jump from i-k to i-1. The challenge was how to maintain the maximum value in this window as it moves during iteration. This problem is closely related to Jump Game II on LeetCode.

PhonePe | SDE- 1 | Bangalore
phonepe logo
Phonepe
SDE-1Bangalore, India0.4 yearsRejected
October 21, 202128 reads

Summary

I applied for the SDE-1 role at PhonePe in Bangalore and successfully navigated through three interview rounds, receiving an offer which I ultimately rejected due to other competing opportunities.

Full Experience

My interview process at PhonePe was very smooth, with all rounds concluding within a week. There were a total of three rounds:

  • Online Coding Assessment: This was the first step.
  • DSA-based technical round: In this round, I was asked three programming questions, which were considered to be of medium-hard difficulty.
  • Hiring Manager round: This round focused primarily on discussions about my current company's projects and my understanding of DBMS concepts. A good understanding of my previous company's projects was crucial here.

Although I received an offer, I decided to reject it as I had other competing offers.

Interview Questions (3)

Q1
Contains Duplicate II
Data Structures & AlgorithmsMedium

Given an array of integers nums and an integer k, return true if there are two distinct indices i and j in the array such that nums[i] == nums[j] and abs(i - j) <= k.
Constraint: 0 <= nums.length <= 10^5, 10^9 <= nums[i] <= 10^9, 0 <= k <= 10^5
Example:
nums = [1,2,3,1], k = 3 => true
nums = [1,0,1,1], k = 1 => true

Q2
K-diff Pairs in an Array
Data Structures & AlgorithmsMedium

Given an integer array nums and an integer k, return the number of pairs (i, j) where i < j and |nums[i] - nums[j]| == k.
Example:
nums = [1,2,2,1], k = 1 => 2 ([1,2] at (0,1) and (3,2))
nums = [1,3,1,5], k = 2 => 1 ([1,3] at (0,1))

Q3
Minimum Switches to Illuminate Binary String
Data Structures & AlgorithmsHard

Given a binary string (e.g., '0110100') where '1' means light is present and '0' means no light. Each switch, when turned on at index i, illuminates indices i-1, i, and i+1. Find the minimum number of switches to turn on to illuminate all '0's in the string.

Have a Phonepe Interview Experience to Share?

Help other candidates by sharing your interview experience. Your insights could make the difference for someone preparing for their dream job at Phonepe.