cleartrip logo

Cleartrip Interviews

2 experiences65 reads3 questions50% success rate
Cleartrip SDE-2 Machine Coding F2F
cleartrip logo
Cleartrip
SDE-2
October 11, 202528 reads

Summary

I recently had a machine coding interview at Cleartrip for the SDE-2 role. The challenge involved designing and implementing a real-time order notification system to alert various users about significant order lifecycle events.

Full Experience

I recently interviewed at Cleartrip for an SDE-2 position, which included a machine coding round. The objective was to design and implement a real-time order notification system for an e-commerce platform. This system needed to alert various users like customers, sellers, and logistics partners about significant events in an order's lifecycle, with a focus on extensibility.

The core requirements involved handling three primary order event types: 'Order Placed', 'Order Shipped', and 'Order Delivered'. Different stakeholders were interested in specific events: customers for all three, sellers only for 'Order Placed', and logistics only for 'Order Shipped'. Critically, notifications were only to be sent to stakeholders linked to a particular order.

The system also needed to support multiple configurable notification channels, such as Email, SMS, and App Push. I had to implement functionalities allowing stakeholders to subscribe to specific event types with preferred channels, and manage these subscriptions by unsubscribing or adding/removing channels.

Bonus requirements included implementing an 'Event replay' feature for specific orders, event types, and stakeholders, ensuring concurrency handling for subscription management, and designing the notification sending process to be asynchronous and non-blocking.

Interview Questions (1)

Q1
Design Real-Time Order Notification System
System DesignHard

Objective Develop a real-time order notification system for a modern e-commerce platform. The system should alert various users (customers, sellers, logistics etc) about significant events in an order's lifecycle. The system must be designed in an extensible manner so that more users can be easily accommodated in the future if needed.

Requirements Handling Event : Implement a system that handles three primary order events types

  • Order Placed: Triggered when a customer successfully creates an order.
  • Order Shipped: Triggered when the seller ships the package.
  • Order Delivered: Triggered when the logistics partner confirms delivery.

Messaging Stakeholders : The system must notify different types of subscribers, each interested in specific events:

  • Customer: Should be notified of all three events (Order Placed, Order Shipped, Order Delivered).
  • Seller: Should only be notified when an order is placed.
  • Logistics (Delivery Partner): Should only be notified when an order is shipped to manage the delivery.
  • Only stakeholders linked to a particular order should be notified

Notification Channels : The system must support multiple channels for sending notifications. The choice of channel should be configurable. For example, it could be possible that the customer is receiving only mails for order getting placed. Types of notification channels could be

  • Email Notification
  • SMS Notification
  • App Push Notification

Functional Requirements

  • Subscribe to Event:

    • Allow a stakeholder (e.g. a Customer) to subscribe to notifications for a specific event type with preferred channels of choice (e.g an Email).
    • Notifications should only be sent to Stakeholders linked with a particular order.
  • Manage Subscriptions : Stakeholders should be able to

    • Unsubscribe from Event : Allow a stakeholder to unsubscribe from notifications for a particular event type. Once any stakeholder unsubscribes from a particular event type, they will not receive any notification for any order for that particular event type.
    • Add / Remove Channels : A stakeholder should be able to manage their preferred channels for receiving notifications i.e add or remove channels as per choice. (It can be assumed that by default all the channels would be enabled by default for any user)

Bonus Requirements:

  • Event replay : Implement a feature to replay the notification events for a particular order id, event type and stakeholder.

    • When we replay a certain event, the stakeholder will receive the message on all the subscribed channels again for that particular order. For example if I can replay an Order delivery message for the Order - 001 for the Customer who had subscription on Email and Phone, The tagged customer with that particular order will receive the message on Email and Phone.
    • The preferred channels for stakeholders during replay should be the latest preference on each subscription. For example, if customer A had Email and App push notification as preferred channels for Order 0 while getting notifications initially and later changed it to SMS only, the replay would only include SMS notifications.
  • Concurrency : Handle cases related to user concurrency where multiple stakeholders could be trying to add / remove subscriptions

  • Asynchronous : The notifications should be sent in a non-blocking manner for the order system.

Cleartrip | Flipkart | Offer
cleartrip logo
Cleartrip
Software Development Engineer 1 (SDE1)2 yearsOffer
September 29, 202537 reads

Summary

I recently interviewed at Cleartrip for a Software Development Engineer role, receiving an SDE1 offer after 2 years of experience. The process involved multiple rounds including machine coding, data structures & algorithms, hiring manager discussions, and system design.

Full Experience

Hey, I recently completed my interview process with Cleartrip and wanted to share my experience. I have 2 years of experience and ultimately received an SDE1 offer.

Round 1: Machine Coding

This was the initial machine coding round.

Round 2: Machine Coding Discussion

Following the coding round, there was a discussion based on my machine coding solution.

Round 3: Problem Solving & Data Structures

This round focused on standard LeetCode-style data structures and algorithms questions.

Round 4: Hiring Manager (First Attempt)

I expected this round to focus on resume and behavioral questions, but surprisingly, I also received a DSA question. We discussed the architecture of my current company. Additionally, I was asked a DSA question related to Zigzag String Conversion. The interviewer only required an approach, not the full code. I provided one approach, but he was looking for a more optimal solution without extra space complexity. Due to this, I received an average rating for this round, which led to an additional hiring manager round.

Round 5: Hiring Manager (Second Attempt)

This round was much better. We primarily focused on behavioral questions, and I received a good rating.

Round 6: System Design

This was a critical round, as the hiring manager gave me a chance for an SDE2 role if I performed exceptionally well. I expected a Low-Level Design (LLD) problem but received a High-Level Design (HLD) problem instead. I was asked to design a carpooling system. We had an in-depth discussion covering the overall design, CAP theorem, database choices, activity diagrams, API specifications, database tables, and their relationships, among many other related topics. Unfortunately, I received an average rating in this design round, leading to an SDE1 offer instead of SDE2.

Interview Questions (2)

Q1
Zigzag String Conversion
Data Structures & Algorithms

I was asked a Data Structures & Algorithms question: Zigzag String Conversion. The interviewer only required an approach, not the full code. I provided one approach, but he was looking for a more optimal solution, specifically one without additional space complexity.

Q2
Design Car Pooling System
System DesignHard

I was tasked with designing a carpooling system. This was a High-Level Design (HLD) problem where we thoroughly discussed the entire system. Key discussion points included the overall design, considerations for the CAP theorem, various database choices, activity diagrams illustrating user flows, API specifications, and the schema for database tables along with their relationships.

Have a Cleartrip Interview Experience to Share?

Help other candidates by sharing your interview experience. Your insights could make the difference for someone preparing for their dream job at Cleartrip.