PhonePe Interview Prep (SDE / SDE-2)

PhonePe is one of India’s most competitive fintech employers. The loop is built around strong DSA fundamentals, clean machine coding, and fintech-scale system design, and each round is eliminatory rather than advisory.

The distinctive feature is the online assessment, which is harder than the interview rounds that follow it: four problems in ninety minutes, with the last one at competitive-programming difficulty. Clear that and the rest of the loop rewards clean code over cleverness.


Interview Process

Stage Duration Focus
Online Assessment 90 min 4 problems: 1 easy, 1 medium, 1 medium-hard, 1 hard (CF 1800+)
Round 1: Machine Coding (LLD) 90 min Design patterns, SOLID, runnable code
Round 2: DSA 45-60 min 1-2 problems, brute force then optimised
Round 3: HLD (SDE-2 and above) 45-60 min Fintech-scale distributed systems
Round 4: Hiring Manager 45 min Projects, leadership, culture fit

Key insight: PhonePe rejects candidates with correct logic but messy code. Write clean, named, modular code even in the DSA round. The assessment is the hardest single gate — see the OA pattern section below for what the four questions look like and what score clears it.


What PhonePe Actually Tests

Derived from 95 reported PhonePe-tagged problems. Difficulty mix:

Difficulty Count Share
Easy 3 3%
Medium 55 58%
Hard 37 39%

Over a quarter of the list is Hard, so treat Hard problems as the baseline rather than a stretch goal.

Where those problems fall by pattern:

Rank Pattern Problems Share of list
1 Dynamic Programming 24 25%
2 Graphs 20 21%
3 Arrays & Hashing 9 9%
4 Heap / Priority Queue 8 8%
5 Stack & Monotonic Stack 6 6%
6 Math & Bit Manipulation 5 5%
7 Binary Search 5 5%
8 Trees 5 5%
9 Tries & String Search 3 3%
10 Intervals, Greedy & Sorting 3 3%

PhonePe Signature Problems

These rank high on PhonePe’s list but are reported by few other companies — the questions that are distinctively theirs rather than generic interview classics. The last column is how many of the 142 companies on this site report each one.

# Problem Pattern Difficulty Also asked at Link
1 Find Beautiful Indices in the Given Array II Boyer–Moore String-Search Algorithm + KMP Hard 3 of 142 LeetCode →
2 Count the Number of Arrays with K Matching Adjacent Elements Fermat’s Little Theorem + Combinatorics Hard 5 of 142 LeetCode →
3 Maximum Amount of Money Robot Can Earn DP Medium 5 of 142 LeetCode →
4 Most Stones Removed with Same Row or Column Bipartite Graph + Union-Find Medium 9 of 142 Solve →
5 Smallest Range Covering Elements from K Lists Sliding Window + Heap Hard 10 of 142 LeetCode →
6 Maximum Tastiness of Candy Basket Binary Search + Greedy Medium 4 of 142 LeetCode →
7 Simple Bank System Design Medium 13 of 142 Solve →
8 Smallest String With Swaps Union-Find + BFS Medium 10 of 142 LeetCode →
9 Minimum Number of Days to Make m Bouquets Binary Search Medium 9 of 142 Solve →
10 Sum of Distances in Tree DP on Trees + Graph Hard 7 of 142 LeetCode →
11 Zuma Game Memoization + Stack Hard 5 of 142 LeetCode →
12 Distribute Candies Among Children II Combinatorics Medium 5 of 142 LeetCode →
13 Split Array into Consecutive Subsequences Heap + Greedy Medium 3 of 142 LeetCode →
14 Freedom Trail BFS + DFS Hard 2 of 142 LeetCode →

If you are short on time, these carry more PhonePe-specific signal per hour than the universal top-100 lists.


Reported in the Last Six Months

The recency-filtered slice of PhonePe’s list, ranked by how often each was reported. Expect heavy overlap with the all-time classics — that overlap is the point, it means these stay in rotation.

# Problem Pattern Difficulty Link
1 Most Stones Removed with Same Row or Column Bipartite Graph + Union-Find Medium Solve →
2 Count Subarrays With Fixed Bounds Monotonic Queue + Sliding Window Hard Solve →
3 Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit Monotonic Queue + Ordered Set Medium Solve →
4 Make Lexicographically Smallest Array by Swapping Elements Union-Find Medium LeetCode →
5 Minimum Cost to Reach Destination in Time Dijkstra + Graph Hard LeetCode →
6 Predict the Winner Zero-Sum Game + Minimax Medium Solve →
7 Reconstruct Itinerary Semi-Eulerian Graph + Eulerian Circuit Hard Solve →

System Design (HLD) Problems Asked at PhonePe

# Problem Difficulty Link
1 Digital Wallet Advanced Read →
2 Payment System Advanced Read →
3 Delayed Trigger Service Advanced Read →
4 Distributed Job Scheduler Advanced Read →
5 Notification System Intermediate Read →
6 Metrics and Monitoring System Intermediate Read →
7 Unique ID Generator Beginner Read →
8 Rate Limiter Beginner Read →

LLD / Machine Coding Problems Asked at PhonePe

Most asked machine coding: Multilevel Cache and Dispute Resolution Service appear repeatedly (2023-2026). Recent reports show a take-home format on CodeSignal — ninety minutes, submit a ZIP, then a thirty-minute code review call.

# Problem Difficulty Link
1 Multilevel Cache System Intermediate Read →
2 Dispute / Ticket Resolution Service Intermediate —
3 Vehicle Rental System Intermediate —
4 Journey Service (dynamic fare + promotions) Intermediate —
5 Payment Wallet Intermediate Read →
6 Splitwise Intermediate Read →
7 Music Player Intermediate Read →
8 Parking Lot Beginner Read →

DSA Problems Asked at PhonePe

74 problems across 12 pattern groups. Each group is allocated in proportion to its real share of PhonePe’s tagged list, then filled with the highest-frequency problems in that group — so the weight here matches the distribution above rather than burying graph and tree work under the usual array classics.

Dynamic Programming

State definition is the whole battle. Say the recurrence out loud before you write the table. Showing the top 14 of 22 on the list.

# Problem Pattern Difficulty Link
1 Maximum Amount of Money Robot Can Earn DP Medium LeetCode →
2 Maximum Profit in Job Scheduling Binary Search + DP Hard Solve →
3 Jump Game II Greedy + DP Medium Solve →
4 Matchsticks to Square Bitmask + Backtracking Medium Solve →
5 Trapping Rain Water Monotonic Stack + Two Pointers Hard Solve →
6 Zuma Game Memoization + Stack Hard LeetCode →
7 Burst Balloons DP Hard Solve →
8 Cherry Pickup DP Hard Solve →
9 House Robber DP Medium Solve →
10 Maximal Square DP Medium Solve →
11 01 Matrix BFS + DP Medium LeetCode →
12 Coin Change Complete Knapsack + Knapsack Problem Medium Solve →
13 Count Palindromic Subsequences DP Hard Solve →
14 Freedom Trail BFS + DFS Hard LeetCode →

Graphs

Traversal, connectivity, ordering, and shortest paths. The hardest bucket to fake — either you have drilled it or you have not. Showing the top 14 of 19 on the list.

# Problem Pattern Difficulty Link
15 Frequencies of Shortest Supersequences Topological Sort + Graph Hard LeetCode →
16 Most Stones Removed with Same Row or Column Bipartite Graph + Union-Find Medium Solve →
17 Smallest String With Swaps Union-Find + BFS Medium LeetCode →
18 Sum of Distances in Tree DP on Trees + Graph Hard LeetCode →
19 Collect Coins in a Tree Topological Sort + Graph Hard LeetCode →
20 Make Lexicographically Smallest Array by Swapping Elements Union-Find Medium LeetCode →
21 Evaluate Division Bellman–Ford Algorithm + Floyd–Warshall Algorithm Medium LeetCode →
22 Loud and Rich DAG + Topological Sort Medium LeetCode →
23 Minimum Cost to Reach Destination in Time Dijkstra + Graph Hard LeetCode →
24 Minimum Edge Reversals So Every Node Is Reachable Graph + BFS Hard LeetCode →
25 Number of Operations to Make Network Connected Union-Find + Graph Medium LeetCode →
26 Reconstruct Itinerary Semi-Eulerian Graph + Eulerian Circuit Hard Solve →
27 Bricks Falling When Hit Union-Find Hard LeetCode →
28 Longest Consecutive Sequence Union-Find Medium Solve →

Heap / Priority Queue

Top-k, streaming medians, and scheduling. Usually the difference between a passing and a timing-out solution. All 8 on the list.

# Problem Pattern Difficulty Link
29 Smallest Range Covering Elements from K Lists Sliding Window + Heap Hard LeetCode →
30 Kth Smallest Element in a Sorted Matrix Heap + Binary Search Medium Solve →
31 Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit Monotonic Queue + Ordered Set Medium Solve →
32 Furthest Building You Can Reach Heap + Greedy Medium LeetCode →
33 Maximum Performance of a Team Heap + Greedy Hard Solve →
34 Split Array into Consecutive Subsequences Heap + Greedy Medium LeetCode →
35 Count Subarrays With Fixed Bounds Monotonic Queue + Sliding Window Hard Solve →
36 Shortest Subarray with Sum at Least K Monotonic Queue + Sliding Window Hard Solve →

Arrays & Hashing

Prefix sums, counting, and grid walks. The warm-up round, and the one people get careless on. All 7 on the list.

# Problem Pattern Difficulty Link
37 Viewers Turned Streamers Database Hard LeetCode →
38 Bus Routes BFS Hard LeetCode →
39 Make Sum Divisible by P Prefix Sum Medium LeetCode →
40 Rotting Oranges BFS Medium Solve →
41 Ways to Make a Fair Array Prefix Sum Medium LeetCode →
42 First Missing Positive Hash Table + Array Hard Solve →
43 Insert Interval Array Medium LeetCode →

Stack & Monotonic Stack

Nearest-greater, parsing, and span problems. The monotonic variant is the one people miss. All 6 on the list.

# Problem Pattern Difficulty Link
44 Remove K Digits Monotonic Stack + Greedy Medium Solve →
45 Asteroid Collision Stack Medium Solve →
46 Car Fleet Monotonic Stack Medium Solve →
47 Valid Parentheses Bracket Sequences + Stack Easy Solve →
48 Decode String Stack Medium Solve →
49 Decoded String at Index Stack Medium LeetCode →

Trees

Recursion discipline: what you return up, what you pass down. Follow-ups usually push from recursive to iterative. All 5 on the list.

# Problem Pattern Difficulty Link
50 Queue Reconstruction by Height Fenwick Tree + Segment Tree Medium LeetCode →
51 Amount of Time for Binary Tree to Be Infected Binary Tree + BFS Medium LeetCode →
52 Find Duplicate Subtrees Binary Tree + DFS Medium LeetCode →
53 Minimum Time to Collect All Apples in a Tree DP on Trees + BFS Medium LeetCode →
54 Sliding Window Maximum Range Query + Monotonic Queue Hard Solve →

Half of these are binary search on the answer, not on an array. Learn to spot the monotonic predicate. All 5 on the list.

# Problem Pattern Difficulty Link
55 Maximum Tastiness of Candy Basket Binary Search + Greedy Medium LeetCode →
56 Minimum Number of Days to Make m Bouquets Binary Search Medium Solve →
57 Number of Flowers in Full Bloom Ordered Set + Prefix Sum Hard LeetCode →
58 Apply Operations to Maximize Frequency Score Sliding Window + Prefix Sum Hard LeetCode →
59 Heaters Binary Search + Two Pointers Medium Solve →

Math & Bit Manipulation

Number theory, geometry, and bit tricks. Short to write, easy to get subtly wrong on overflow and sign. All 5 on the list.

# Problem Pattern Difficulty Link
60 Count the Number of Arrays with K Matching Adjacent Elements Fermat’s Little Theorem + Combinatorics Hard LeetCode →
61 Check if Point Is Reachable Euclidean Algorithm + GCD Hard LeetCode →
62 Distribute Candies Among Children II Combinatorics Medium LeetCode →
63 Continuous Subarray Sum Pigeonhole Principle + Prefix Sum Medium LeetCode →
64 Shortest Path to Get All Keys Bit Manipulation + BFS Hard LeetCode →

Prefix structures and substring matching. Common wherever autocomplete or search is part of the product. All 3 on the list.

# Problem Pattern Difficulty Link
65 Find Beautiful Indices in the Given Array II Boyer–Moore String-Search Algorithm + KMP Hard LeetCode →
66 Longest Palindromic Substring Manacher + Two Pointers Medium Solve →
67 Longest Common Prefix Trie Easy Solve →

Intervals, Greedy & Sorting

Sort, then make a local decision you can defend. Expect to justify why greedy is safe here. All 3 on the list.

# Problem Pattern Difficulty Link
68 Gas Station Greedy Medium Solve →
69 Candy Greedy Hard Solve →
70 Merge Intervals Quicksort Medium Solve →

Design (Coding)

Build a data structure to a spec. Graded on API shape and the complexity of each operation, not just correctness. All 2 on the list.

# Problem Pattern Difficulty Link
71 Simple Bank System Design Medium Solve →
72 LRU Cache Doubly Linked List + Design Medium Solve →

Sliding Window & Two Pointers

Linear-time scans over arrays and strings. High volume, low variance — these should be automatic. All 2 on the list.

# Problem Pattern Difficulty Link
73 3Sum Two Pointers Medium Solve →
74 Maximum Points You Can Obtain from Cards Sliding Window + Prefix Sum Medium Solve →

PhonePe’s Favourite Patterns (Ranked)

Rank Pattern Frequency Problems on list Start with
1 Dynamic Programming Very High 22 (24%) Maximum Amount of Money Robot Can Earn, Maximum Profit in Job Scheduling, Jump Game II
2 Graphs High 19 (21%) Frequencies of Shortest Supersequences, Most Stones Removed with Same Row or Column, Smallest String With Swaps
3 Heap / Priority Queue High 8 (9%) Smallest Range Covering Elements from K Lists, Kth Smallest Element in a Sorted Matrix, Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit
4 Arrays & Hashing Medium-High 7 (8%) Viewers Turned Streamers, Bus Routes, Make Sum Divisible by P
5 Stack & Monotonic Stack Medium-High 6 (7%) Remove K Digits, Asteroid Collision, Car Fleet
6 Trees Medium-High 5 (6%) Queue Reconstruction by Height, Amount of Time for Binary Tree to Be Infected, Find Duplicate Subtrees
7 Binary Search Medium 5 (6%) Maximum Tastiness of Candy Basket, Minimum Number of Days to Make m Bouquets, Number of Flowers in Full Bloom
8 Math & Bit Manipulation Medium 5 (6%) Count the Number of Arrays with K Matching Adjacent Elements, Check if Point Is Reachable, Distribute Candies Among Children II
9 Tries & String Search Medium 3 (3%) Find Beautiful Indices in the Given Array II, Longest Palindromic Substring, Longest Common Prefix
10 Intervals, Greedy & Sorting Medium 3 (3%) Gas Station, Candy, Merge Intervals

How to read this: the top three rows are where your preparation hours should go. A candidate fluent in Dynamic Programming, Graphs, Heap / Priority Queue covers the bulk of what PhonePe actually asks. The rest is insurance for the one round that goes somewhere unexpected.


Worked Java Solutions for the PhonePe Set

💡 Clean Java solutions with approach and complexity for the PhonePe question set are collected here → PhonePe DSA Solutions

The solutions page is organised by category — trees and tree DP, dynamic programming, graphs, arrays and hashing, binary search, stacks, linked lists, heaps, backtracking, and union-find — which is a useful second pass once you have worked through the frequency-ranked tables above.


PhonePe-Specific Questions (Not on LeetCode)

These are custom problems reported from PhonePe OA and interviews:

# Problem Description Pattern Year
1 Seat allocation: N seats, some occupied. For M queries, allocate seat maximizing distance to nearest person. Binary Search / Heap 2024
2 Find three indices i,j,k such that A[i]A[j]A[k] is max with A[i] <= A[j] <= A[k] and i < j < k Sorting + Greedy 2024
3 2D array (n x 2), find max path sum with strictly increasing values, pick one per row Grid DP 2021
4 Minimum moves to convert string A to string B Edit Distance variant 2021
5 People pass a test: score starts at 0, person passes if score > threshold, bound value added after passing. Maximize people passing. Greedy + Sorting 2022
6 Matrix m x n, find max path sum from any element, can only move right or down Grid DP 2022
7 Lexicographically smallest word from NxN matrix with K letter-change operations DP + Greedy 2026
8 Balance coins in binary tree so every node has exactly one coin, minimize total moves Tree DFS 2026

These do not appear verbatim on LeetCode, which is the point: the pattern is familiar, the statement is not. Practice restating an unfamiliar problem as a known pattern out loud, because that is the skill being tested.


OA Pattern (Online Assessment)

PhonePe OA has 4 questions in 90 minutes on DoSelect platform.

Difficulty Typical Topic Solve Target
Q1 (Easy) Arrays / Strings Must solve
Q2 (Medium) Binary Search / Sliding Window Must solve
Q3 (Medium-Hard) Trees + DP / Graph Should solve
Q4 (Hard) CF 1800-2000 rated Partial credit OK

Solving 2.5-3 questions typically clears the OA.

The practical consequence is time allocation. Q1 and Q2 should take under thirty minutes combined; anything longer and Q3 becomes unreachable. Read all four before starting so you know which one to abandon.


Behavioural Round

# Question
1 Walk me through the most complex system you have worked on. What was your part of it?
2 Tell me about a correctness bug that involved money or data integrity.
3 Tell me about an incident you were on call for. What did you change afterwards?
4 Tell me about a time you disagreed with a technical decision and how you handled it.
5 Tell me about a time you had to ship with known technical debt.
6 Tell me about a time you simplified something that had grown complicated.
7 Tell me about a time you had to explain a technical risk to a non-engineer.
8 Why fintech, and why PhonePe?

Fintech interviewers listen for whether you treat correctness as a hard constraint. A story where you caught a reconciliation mismatch, or pushed back on a release because retries were not idempotent, does more here than a story about raw scale.


14-Day Prep Plan

Built from the pattern ranking above, so the heaviest topics get the most time.

Day Focus Problems
1 Dynamic Programming (part 1) Maximum Amount of Money Robot Can Earn, Maximum Profit in Job Scheduling, Jump Game II
2 Dynamic Programming (part 2) Matchsticks to Square, Trapping Rain Water, Zuma Game
3 Graphs (part 1) Frequencies of Shortest Supersequences, Most Stones Removed with Same Row or Column, Smallest String With Swaps
4 Graphs (part 2) Sum of Distances in Tree, Collect Coins in a Tree, Make Lexicographically Smallest Array by Swapping Elements
5 Heap / Priority Queue (part 1) Smallest Range Covering Elements from K Lists, Kth Smallest Element in a Sorted Matrix, Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit
6 Heap / Priority Queue (part 2) Furthest Building You Can Reach, Maximum Performance of a Team, Split Array into Consecutive Subsequences
7 Arrays & Hashing Viewers Turned Streamers, Bus Routes, Make Sum Divisible by P
8 Stack & Monotonic Stack Remove K Digits, Asteroid Collision, Car Fleet
9 Trees Queue Reconstruction by Height, Amount of Time for Binary Tree to Be Infected, Find Duplicate Subtrees
10 Binary Search Maximum Tastiness of Candy Basket, Minimum Number of Days to Make m Bouquets, Number of Flowers in Full Bloom
11 Math & Bit Manipulation Count the Number of Arrays with K Matching Adjacent Elements, Check if Point Is Reachable, Distribute Candies Among Children II
12 Mock round Two problems in 45 minutes, timed, no hints. Simulate the real round.
13 Revision Redo the problems you failed or needed a hint on.
14 Light review + rest Re-read your pattern notes. Sleep early.

Tips for PhonePe Interviews

  1. Machine coding is make-or-break. PhonePe weighs the LLD round heavily. Practice writing clean, extensible code in ninety minutes with at least one pattern used deliberately rather than decoratively.
  2. Show progression in DSA. Start with brute force, explain why it is slow, then optimise. They evaluate your thought process, not only the final answer.
  3. Expect fintech-specific deep dives. Idempotency, double-entry ledgers, reconciliation, and saga patterns come up in HLD rounds, and you are expected to raise them unprompted.
  4. Concurrency follow-ups are common. After a DSA problem they may ask how you would make it thread-safe. Be ready with synchronized, explicit locks, or ConcurrentHashMap, and know the trade-offs.
  5. Code quality matters. PhonePe rejects candidates with correct logic but messy code. Meaningful names, separated concerns, small methods.
  6. The OA is harder than the interview rounds. The assessment includes competitive-programming-rated problems. Do not be discouraged if you cannot finish the last one — partial credit is expected.
  7. Rehearse the take-home variant. If your machine coding round is the CodeSignal ZIP format, you will defend the code in a review call. Leave it in a state you can explain, with a README and a runnable entry point.

Other Company Prep


Round structures, durations, assessment platform, and the machine coding format reflect commonly reported candidate experience rather than published PhonePe documentation. The take-home variant of the machine coding round is not universal, and the PhonePe-specific questions above are paraphrased from candidate reports. Confirm your round list with your recruiter.