Panda Guru LogoPanda
Guru

PhonePe Senior SDE bengaluru [Exp 7+]

Round 1: Design Round

Questions: Design a payment transition journey for a user.
Design and implement a user journey service for monitoring users as they navigate through various use cases. This will be a rule-based journey framework where a user will onboard a journey and move along various stages on the basis of specific conditions.

Requirements:

Example:

Mandatory Implementations:

Optional:

  1. Provide a way to send SMS to a user as soon as any stage transition happens.
  2. Add support for recurring journeys.

Why the journey service? This service serves as a platform for creating multiple journeys for different user paths and tracking users along the journey.

Points to note:

Result: CLEARED

Candidate's Approach

The candidate designed a service that tracks user journeys using a Directed Acyclic Graph (DAG) structure. They implemented the mandatory functions to create, update, and evaluate journeys, ensuring that the service could handle multiple users and maintain isolation between journeys. The candidate also focused on ensuring the code was clean and executable, with proper validations and error handling.

Interviewer's Feedback

The interviewer appreciated the candidate's understanding of the requirements and their ability to implement the necessary functionalities effectively. They noted the clarity of the design and the candidate's attention to detail in handling edge cases.


Round 2: High Level System Design

Questions: Design a flight aggregator service with the following features:

  1. Need to provide search of flight.
  2. Need to optimize flight searching and rescheduling.
  3. Need to tell tech stack and code flow.

Result: CLEARED

Candidate's Approach

The candidate proposed a high-level architecture for the flight aggregator service, detailing how to implement the search and optimization features. They discussed the tech stack that would be suitable for the service and outlined the code flow for handling flight searches and rescheduling.

Interviewer's Feedback

The interviewer found the candidate's design to be well thought out and comprehensive. They appreciated the candidate's ability to articulate the tech stack and code flow clearly.


Round 3: Problem Solving

Questions:

  1. Complete Binary Tree Inserter

    • Output: need to return the next element 5 plus the parentNode.
    • Trick: do not give O(n) solution, want log(n) solution.
    • Result: Able to solve in O(n), not able to solve in log(n).
  2. Queue Reconstruction by Height

    • First element: define height of person.
    • Second element: position before.
    • Example Input: [[7,0],[4,4],[7,1],[5,0],[6,1],[5,2]]
    • Expected Output: [[5,0],[7,0],[6,1],[5,2],[4,4],[7,1]].

Result: Waiting for result.

Candidate's Approach

The candidate attempted to solve both problems but faced challenges with the second problem, particularly in achieving the desired time complexity. They provided a solution for the first problem but acknowledged it did not meet the log(n) requirement.

Interviewer's Feedback

The interviewer noted the candidate's effort in tackling the problems but highlighted the need for improvement in optimizing solutions. They encouraged the candidate to focus on time complexity in future problem-solving scenarios.