Phonepe Interview Questions
- DSA
- LLD
- HLD
Q1: Min Stack
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.
Concepts Tested:
- Stack
- Auxiliary stack for tracking minimum values
- O(1) retrieval
Example:
Input: push(-2) push(0) push(-3) getMin() → -3 pop() top() → 0 getMin() → -2
Q2: Accounts Merge
Given a list of accounts where each account has a name and list of emails, merge accounts that belong to the same person.
Example:
Input: [[“John”,”johnsmith@mail.com”,”john_newyork@mail.com”], [“John”,”johnsmith@mail.com”,”john00@mail.com”]]
Output: [[“John”,”john00@mail.com”,”john_newyork@mail.com”,”johnsmith@mail.com”]]
Q3: Variants of LRU/LCS you could be asked
Given start and end times of meetings, find the minimum number of meeting rooms required.
Example:
Input: [[0,30],[5,10],[15,20]]
Output: 2
Q4: Maximum Product Subarray
Find the contiguous subarray that has the largest product.
Example:
Input: nums = [2,3,-2,4]
Output: 6
Explanation: [2,3] has the largest product 6
Q5: Gas Stationy
Given two integer arrays gas and cost, return the starting gas station index where you can travel around the circuit once.
Example:
Input: gas = [1,2,3,4,5], cost = [3,4,5,1,2]
Output: 3
Q6: Burst Balloons
You are given n balloons, each balloon painted with a number. When you burst the ith balloon, you get coins nums[i – 1] * nums[i] * nums[i + 1].
Example:
Input: [3,1,5,8]
Output: 167
Q7: Matchsticks to Square
Given matchsticks, determine if they can form a square.
Concepts Tested:
- Backtracking
- Bitmask optimization
Q8: Kth Smallest Element in Sorted Matrix
Find the k-th smallest element in a sorted matrix.
Approach:
- Min-Heap
- Binary Search on value range
Q9: Maximum Profit in Job Scheduling
Given start, end, and profit arrays, find the maximum profit with non-overlapping jobs.
Q10: Determine if Two Strings Are Close
Two strings are close if you can swap and rearrange characters to make them equal.
Example:
Input: word1 = “abc”, word2 = “bca”
Output: true
Q1. Fitness Class Booking System
Design and implement a booking system for users to register, choose, and book fitness classes with tier-based quotas and waitlisting.
Core Features:
- User registration (Platinum/Gold/Silver tiers)
- Class scheduling & capacity management
- Booking with concurrency handling
- Waitlist & cancellation logic
Q2. Complaint Resolution System
Design a system for handling transaction-related issues.
Core Methods:
- createIssue(transactionId, type, description, email)
- assignIssue(issueId)
- updateIssue(issueId, status)
- resolveIssue(issueId, resolution)
- viewAgentsWorkHistory()
Q3. App Version Management System
Design an app lifecycle management system to handle installs, updates, rollouts, and compatibility.
Functions:
- uploadNewVersion()
- createUpdatePatch()
- releaseVersion()
- isAppVersionSupported()
- checkForInstall() / checkForUpdates()
Q4. Communication Layer System
Design a system that sends communications (SMS, Email, Soundbox).
Core Methods:
- addProvider() / updateProvider()
- processRequest()
- updateState(providerId, active)
Q5. Hackathon Platform Backend
Design backend for an interactive coding hackathon with problem management and leaderboards.
Core Methods:
addProblem(), addUser(), solve(), fetchProblems(), getLeader()
Q6. Advertisement Engine
Build an ad-serving platform managing advertisers, campaigns, budgets, and targeting rules.
Features:
- Add advertiser & campaign
- Match ads to users based on attributes
- System constraints: no repetition, budget limits
Q7. Battleship Game
Design a 2-player battleship game with both manual and auto fire modes.
Q1. Online Game System (Ludo / Chess / Snakes & Ladders)
Design a multiplayer game backend.
Discussion Points:
- Matchmaking logic (Noob vs Pro)
- APIs & DB Design
- Fault tolerance & scalability
Q2. Instagram System Design
Design Instagram focusing on core services: post, feed generation, likes/comments, and real-time sync.
Q3. Search Autocomplete Feature
Design a scalable search suggestion service using Trie and caching.
Q4. Trigger Notification Service
Design a service that registers triggers with delays and sends notifications when the trigger time completes.
Q5. Payment Gateway System
Design a payment gateway backend supporting multiple payment methods, transaction status, and reconciliation.