phonepe logo
PhonePe· Software Engineer (Backend)

PhonePe | Software Engineer (Backend) | Machine Coding

Experience
2 years
Posted
19 May 2025
382 reads

Summary

I had a machine coding interview for a Software Engineer (Backend) role at PhonePe, where I was given two hours to design and implement a fitness class booking application. I successfully moved to the second round after explaining my design and code quality, and also addressed a follow-up coding problem during the interview.

How it went

YOE: 2 years

Was given two hours to code this as an assignment. Question was held on codesignal, but you could use any IDE of your preference. You just need to mail the code. Interview was held 5 days later after submitting this assignment. You have to go through your code and explain your design.

Interviewer will judge you on the basis of your code quality, were you able to make it executable.

If you need C++ code for this just drop your email/linkedin/whatever. I can send you.

Verdict: was able to move to second round.

In interview

was asked to implement a method such that user shouldn't be able to book a class it has already booked a class in same timeslot. (was given 5 mins for that)

Questions asked (2)

  1. 01

    Design and Implement a Fitness Class Booking System

    System Design · Hard

    Objective: Design and implement an application to allow users to choose and book fitness classes. The application should cater to user management, class scheduling, and booking, including waitlisting and cancellation features. Requirements:

    User Management:

    Registration and Login: Users should be able to register and log in to the system. User Tiers: Users can be categorized into three tiers: Platinum, Gold, and Silver. Each tier has a different booking limit: Platinum: 10 classes Gold: 5 classes Silver: 3 classes Packages: The user tiers align with the packages, determining the number of classes a user can book. Classes: Types: Classes can include yoga, gym, and dance etc etc. Capacity: Each class has a maximum number of attendees. Scheduling: Classes are scheduled at specific times, and multiple classes can run in a single day. Booking: Users can book a class if it has not reached capacity. An admin can create, schedule, and cancel classes. Waitlisting: If a class is full, users can join a waitlist. When a booked user cancels, the first user on the waitlist is allocated the slot. Cancellation: Users can cancel their booking up to 30 minutes before the class starts. Admins can also cancel classes. Methods: This is just to help you understand. Actual implementation may differ. User Management: Register/Login, Select Package

    Classes (Admin): Create a class, Schedule a class, Cancel a class

    Booking (User): Book a class, Cancel a class

    Additional Considerations:

    1. Users should be able to book classes at different times.
    2. Concurrency management for multiple users trying to book the same class simultaneously.
    3. Handling package strategies effectively.
    4. Ensuring that user cancellations restore their booking quota.

    Evaluation Criteria:

    Design:

    • Use of object-oriented design principles (classes, interfaces, inheritance, polymorphism).
    • Efficiency and scalability of data structures.
    • Flexibility and modularity of system components.
    • Consideration of security and data privacy principles.

    Implementation:

    • Functionality and accuracy of system features.
    • Performance and resource optimization of algorithms.
    • Code readability, maintainability, and adherence to coding standards.
    • Error handling and exception management for smooth operation.

    Expectations:

    • Provide clean, professional-level code.
    • Model core entities and relationships effectively.
    • Demonstrate the solution with a method-based approach.
    • Use memory-based object storage; a backend database is not required.

    [execution time limit] 0.5 seconds (cpp)

    [memory limit] 2g

  2. 02

    Prevent Booking Multiple Classes in Same Timeslot

    Data Structures & Algorithms · Medium

    In interview was asked to implement a method such that user shouldn't be able to book a class it has already booked a class in same timeslot. (was given 5 mins for that)

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!