PhonePe | SDE Intern | Interview Experience
Anonymous User
211

Recently I had the oppourtunity to go through the recruitment process of PhonePe for the SDE Intern position for the summer of 2027 (Location - Bangalore/Pune). I'm sharing the problems here for anyone who might find it helpful!

Tehnical Round - 1

It was fully based on DSA (2 problems were asked). No other discussion whatsoever. We were supposed to write the code on paper.

  1. This exact problem: https://leetcode.com/problems/shortest-bridge/description/

  2. You are given an array of length n, where each element represents the coverage range of that index. If you choose an index i with value > 0, it covers all positions from i - value to i + value (inclusive), with the coverage clipped to the array boundaries. The chosen element also covers itself as part of this range. And, if arr[i] = 0, choosing that index provides no coverage at all, including not covering itself. Your task is to select the minimum number of indices such that every position in the array is covered by at least one selected index. If it is impossible to cover the entire array regardless of which indices are chosen, return -1.

    Here's the LC equivalent : https://leetcode.com/problems/minimum-number-of-taps-to-open-to-water-a-garden/description/

Technical Round - 2

Again, fully based on DSA.

  1. You are given a string consisting of lowercase English letters ('a'–'z'). A substring is said to be balanced if it contains an equal number of vowels and consonants. The vowels are {a, e, i, o, u}, and every other lowercase letter is considered a consonant. Your have to determine the total number of balanced substrings in the given string.

  2. This exact problem: https://leetcode.com/problems/shortest-path-in-a-grid-with-obstacles-elimination/description/

  • Since after solving these two problems there was time left in the interview, I was asked another problem (thankfully which was easy and I was able to explain my thinking and write the code for it quickly). Also, the interviewer didn't seem to care about any particular edge cases or even complexity as much for this question (I'm just remembering that I didn't discuss the complexity for it and neither he asked), he was just seemed satisfied that I solved it quickly.
  1. You are given the root of a binary tree where each node contains an integer value. For every node that is not a leaf node, compute the average value of all nodes in the subtree rooted at that node. The average of a subtree is defined as the sum of the values of all nodes in the subtree [value of that node and all the nodes in its right and left subtree] divided by the total number of nodes in that subtree. Return max average value.

HR Round

  • Questions based on my resume (projects, achievements) - in pretty good detail. And behavioural questions.
Comments (3)