Flipkart | SDE2 | Bangalore | April 2024 [Offer]

flipkart logo
flipkart
SDE IIBangalore2.6 yearsOffer
April 26, 20240 reads

Summary

I recently received an offer for an SDE-2 role at Flipkart in Bangalore after a comprehensive interview process that concluded in April 2024. My journey spanned multiple technical and managerial rounds, thoroughly testing my skills in machine coding, data structures, system design, and techno-managerial aspects.

Full Experience

My interview journey for the SDE-2 role at Flipkart began in the first week of March 2024, culminating in an offer in April. I have 2.6 years of experience, and the entire process consisted of five rounds.

Round 1: Machine Coding/LLD (90 minutes)

This round was split into 30 minutes for problem statement discussion and 1 hour for coding. The task was to design an in-memory vehicle rental service, similar to Zoomcar, specifically for a single city with multiple branches. Key functional requirements included:

  • Managing multiple branches, each with a limited number of different vehicle types.
  • Booking vehicles for predefined 1-hour slots on a single day (00-59).
  • Fixed pricing per vehicle.
  • Features for onboarding new branches and vehicles.
  • Renting a vehicle for a time slot and type (defaulting to the lowest price).
  • Displaying available vehicles for a given branch.

The system had to be CLI-driven and utilize in-memory data structures, prohibiting any database usage. I was given 1 hour to code. My approach involved analyzing requirements to identify entities, then creating Model/POJO and DTO classes. I developed services and controllers for user interactions, prioritizing loose coupling and dependency injection. For persistence, I relied on Java Collections, ensuring thread safety (though optional). I implemented a minimal exception hierarchy and global exception handler. To optimize operations like vehicle booking (Requirement 3), I considered using a min-heap, accepting an overhead on vehicle insertion queries. For displaying available vehicles (Requirement 4), I overrode the toString method. I also applied design patterns like Factory (for vehicle generation), Strategy (for pricing), and Singleton (for managing thread-safe instances). Post-coding, I demoed the system with various use cases and answered questions on design patterns used, schema design, and database storage/query patterns.

Round 2: DSA/PSDS (60 minutes)

This round involved two LeetCode Medium problems.

  1. The first problem was an overlapping interval scenario, which I approached using a line sweep algorithm.
  2. The second problem was a standard tree question: "Print Level order traversal of a binary tree using Given Inorder and Preorder Traversal". I was required to provide a clean, compilable solution and explain my intuition clearly. I leveraged concepts like Sorting, TreeSet, Binary Trees, and Recursive Subproblems. Having solved around 120 medium problems on LeetCode, I found this round manageable.

Round 3: Design (LLD+HLD) (60 minutes)

I was asked to design BookMyShow. I began by gathering functional requirements and mapping out a user journey, which included searching for shows, selecting screenings and seats, proceeding to checkout, completing payments, and viewing tickets. I then designed APIs for each step, such as GET /shows/queryKeyword, GET /shows/selectSeats, POST /shows/confirm (which would acquire soft row locks), POST /shows/checkout, and GET /bookings/mybookings. I detailed how different objects would interact with these APIs, and how operations would be handled internally down to the database level. Critical discussions included managing concurrent seat bookings, failure scenarios, data store choices, race conditions, and resource contention. For the High-Level Design (HLD) part, I crunched numbers for user base, bandwidth, traffic, and storage requirements. I also discussed Non-Functional Requirements (NFRs), sharding strategies, load balancing, and caching mechanisms.

Round 4: Techno-Managerial Round (60 minutes)

This round was with a Senior Engineering Manager and focused on my profile and past experience. I was asked to deep-dive into a specific project, discussing its problem statement, technical solution, business case, coding, and deployment. We explored alternative solutions, potential improvements, and enhancements. Since it was a microservices project, I explained its entire ecosystem. Questions also covered NFRs, high-level architecture, DevOps practices, pipelines, and deployment choices. My mention of Redis led to questions on Redis clustering and replication. Additionally, I faced scenario-based technical and behavioral questions, focusing on incident/bug handling, downtime issues, and ownership. The interviewer made me comfortable, allowing me to articulate my thoughts freely. The round concluded with a discussion about my career progression and role development.

Round 5: HM Connect

This was a casual discussion with the Hiring Manager, focusing on the technical ecosystem, Lines of Business (LOBs), team structure, and culture fitment. I asked several follow-up questions, and the manager provided clear insights into the organization's scale and engineering culture. We also touched upon individual progression and benefits.

Interview Questions (3)

Q1
Design a Vehicle Rental Service (Machine Coding)
Data Structures & Algorithms

Design a vehicle rental service similar to Zoomcar. Key functional requirements include:

  1. Rental service has multiple branches throughout the city. Assume one city for now.
  2. Each branch has a limited number of different types of vehicles.
  3. Each vehicle can be booked with a predefined price. For simplicity, assume fixed pricing.
  4. Each vehicle can be booked in multiples of 1-hour slots each. For simplicity, assume slots of a single day (00-59, e.g., 9 am-10 am). No past bookings should be allowed.
Requirements:
  1. Onboard a new branch with an available vehicle.
  2. Onboard new vehicle(s) of existing type to a particular branch.
  3. Rent a vehicle for a time slot and a vehicle type (lowest price as the default choice, extendable to any other strategy).
  4. Display available vehicles for a given branch.
Constraints: The system must use in-memory data structures (no database) and be CLI driven. I had 1 hour for coding after 30 minutes of discussion. The focus was on functionality, modularity, extensibility, and good design principles.
Q2
Print Level Order Traversal from Inorder and Preorder Traversal
Data Structures & AlgorithmsMedium

Given the Inorder and Preorder traversals of a binary tree, print its Level Order Traversal.

Q3
Design BookMyShow
System DesignHard

Design a system like BookMyShow. I started by gathering functional requirements, took them through a user journey to consolidate system behavior, and identified entities for a class diagram, justifying associations and use cases. The sample user journey involved searching for shows, selecting screening/theatre, selecting seats, proceeding to checkout (potentially adding services), completing checkout, and viewing generated tickets under 'my bookings'. I created APIs for these scenarios (GET /shows/queryKeyword, GET /shows/selectSeats, POST /shows/confirm, POST /shows/checkout, GET /bookings/mybookings). I discussed how objects interact with APIs, internal operations up to the DB, handling concurrent seat bookings, failure scenarios, data store choices, race conditions, and resource contention. For HLD, I crunched numbers for user base, bandwidth, traffic, and storage, and discussed NFRs, sharding, load balancing, and caching.

Preparation Tips

I found the content across GeeksForGeeks, LeetCode, and YouTube to be sufficient for preparation. I highly recommend taking mock system design interviews before the actual ones, as I felt there was a lot to learn in my first design rounds.

Resources Used:

Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

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