phonepe logo
PhonePe· SDE-1

PhonePe | SDE-1 | Bangalore | Aug 2022 | Selected

Result
Offer
Location
Bangalore
Posted
25 Feb 2023
376 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.

How it went

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!

Questions asked (18)

  1. 01

    Split Array Largest Sum

    Data Structures & Algorithms · Hard

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

    Open the problem
  2. 02

    Flower Planting With No Adjacent (Variation)

    Data Structures & Algorithms · Hard

    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.

    Open the problem
  3. 03

    Max People Pass Test with Score & Bound

    Data Structures & Algorithms · Hard

    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.

  4. 04

    Most Sad Array Pair

    Data Structures & Algorithms · Hard

    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.

  5. 05

    Amount of Time for Binary Tree to Be Infected

    Data Structures & Algorithms · Medium

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

    Open the problem
  6. 06

    Sum of Subarray Minimums

    Data Structures & Algorithms · Medium

    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.

    Open the problem
  7. 07

    Generate Parentheses

    Data Structures & Algorithms · Medium

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

    Open the problem
  8. 08

    Burst Balloons

    Data Structures & Algorithms · Hard

    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.

    Open the problem
  9. 09

    Optimize Water Distribution in a Village

    Data Structures & Algorithms · Hard

    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.

    Open the problem
  10. 10

    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.

  11. 11

    Find Faster Rat (Puzzle - 16 Rats)

    Other

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

  12. 12

    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.

  13. 13

    Stack vs Heap Memory

    Other

    Explain the difference between Stack memory and Heap memory.

  14. 14

    What is Inheritance?

    Other

    Explain what inheritance is.

  15. 15

    Virtual Function and Class in C++

    Other

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

  16. 16

    Deadlock (OS)

    Other

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

  17. 17

    Design a Single Lift System

    System Design

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

  18. 18

    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.

How they prepared

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.

Know someone preparing? Send it to them:WhatsAppLinkedInX

Interviewed at PhonePe recently?

Write up your rounds while you still remember the questions. It helps the next person more than you would think.

Share your experience
Discussion 0

Questions for the author, or how your own interview compared.

Join the discussion

Sign in with Google to comment or ask the author a question.

No comments yet

Be the first to share your thoughts and start the discussion!