← Zepto Interview Insights

Zepto·Software Engineer·Onsite - Multi Round·Junior

JuniorPending
May 2026

Summary

Went through two rounds at Zepto for an SDE-1 position. First round was pure DSA, moved fast. Second round mixed in some system design and my performance was shaky. Been sitting in silence ever since and not sure if that's normal or if I'm already out.

Questions Asked (3)

Q1

Given a list of edges, determine whether they form a valid tree.

Algorithms & Data Structures
Author's notes

Classic graph problem but you need to check two things: no cycles and the graph is fully connected.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Clarify the definition of a valid tree: a connected acyclic graph with exactly n-1 edges for n nodes. Then propose using Union-Find (Disjoint Set Union) to detect cycles while ensuring all nodes are connected, or BFS/DFS to check connectivity and edge count.

Pro tip: Mention edge cases upfront: empty graph, single node, self-loops, and parallel edges. Also, note that if the number of edges is not exactly n-1, it's immediately invalid, which can save time.

1. Clarify the problem

Confirm that a valid tree must be connected, acyclic, and have exactly n-1 edges for n nodes. Ask about input format: are nodes labeled 0 to n-1? Can there be duplicate edges or self-loops?

2. Check edge count

If the number of edges is not exactly n-1, return false immediately. This is a necessary condition for a tree.

3. Choose an algorithm

Use Union-Find to detect cycles while building the graph, or use BFS/DFS to check connectivity and cycle presence. Union-Find is often more efficient for cycle detection.

4. Implement and test

Code the solution, handling edge cases like empty input, single node, and disconnected components. Walk through a small example to verify correctness.

5. Analyze complexity

State time and space complexity. For Union-Find with path compression and union by rank, it's nearly O(E) time and O(N) space.

Key Points to Mention

  • Definition of a tree: connected, acyclic, and exactly n-1 edges.
  • Union-Find (Disjoint Set Union) with path compression and union by rank for efficient cycle detection.
  • Alternative approach: BFS/DFS to check connectivity and count edges.
  • Edge cases: empty graph, single node, self-loops, parallel edges, disconnected components.
  • Time and space complexity analysis.
  • Early termination if edge count != n-1.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q2

Simulate asteroid collisions: given an array of asteroids moving left or right, determine which ones survive.

Algorithms & Data Structures
Author's notes

Stack problem.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Use a stack to simulate collisions: iterate through asteroids, and for each right-moving asteroid push it onto the stack; for a left-moving asteroid, resolve collisions with the top of the stack until it either survives or is destroyed. Finally, the stack contains the surviving asteroids in order.

Pro tip: Clarify the collision rules upfront (e.g., equal sizes both explode, larger survives) and mention edge cases like all asteroids moving in the same direction or no collisions. This shows attention to detail and prevents misunderstandings.

1. Understand the problem and clarify rules

Confirm the collision rules: when two asteroids meet, the smaller one explodes; if equal, both explode; asteroids moving in the same direction never collide. Also clarify input format and expected output.

2. Choose the right data structure

Recognize that a stack is ideal because collisions only happen between the most recent right-moving asteroid and a new left-moving asteroid, following a last-in-first-out order.

3. Simulate collisions step by step

Iterate through the array: if the asteroid moves right, push it onto the stack; if it moves left, repeatedly compare it with the top of the stack (if the top moves right) and resolve collisions until the left-moving asteroid is destroyed or the stack is empty or the top moves left.

4. Handle edge cases and return result

After processing all asteroids, the stack contains the survivors in order. Consider edge cases like no collisions, all moving left, or all moving right, and ensure the solution handles them correctly.

5. Analyze complexity and test

State that the time complexity is O(n) because each asteroid is pushed and popped at most once, and space complexity is O(n) for the stack. Walk through a few examples to verify correctness.

Key Points to Mention

  • Stack-based simulation for O(n) time complexity
  • Collision rules: smaller explodes, equal both explode, same direction no collision
  • Only right-moving asteroids are stored in the stack; left-moving ones trigger collisions
  • Edge cases: empty input, single asteroid, no collisions, all moving same direction
  • Time and space complexity analysis
  • Handling multiple collisions in a single iteration (while loop)

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.

Q3

Design a movie ticket booking system.

System DesignData ModelingTechnical Trade-offs
Author's notes

This is where things got messy for me.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying functional and non-functional requirements, then design the high-level architecture covering core entities like movies, theaters, shows, and seats. Dive into critical components such as seat locking, booking flow, and payment integration, while discussing trade-offs around consistency, scalability, and concurrency.

Pro tip: Emphasize how you handle race conditions during seat selection—this is the crux of the problem and demonstrates your ability to design for real-world concurrency. Also, relate your design to Zepto's scale and low-latency requirements to show contextual awareness.

1. Clarify Requirements

Ask questions to define scope: user flows (search, select, book, pay), scale (users, shows, seats), and constraints (consistency, latency, availability).

2. High-Level Design

Outline core services (movie, theater, show, booking, payment) and data models. Sketch API endpoints and data flow from search to booking confirmation.

3. Deep Dive into Critical Components

Focus on seat locking and booking concurrency: discuss optimistic vs pessimistic locking, distributed locks, and idempotency. Explain payment integration and failure handling.

4. Scalability and Trade-offs

Address scaling reads/writes, caching strategies, database choices (SQL vs NoSQL), and trade-offs between consistency and availability (e.g., CAP theorem).

5. Wrap Up and Extensions

Summarize key decisions, mention monitoring, and suggest potential improvements like recommendation systems or dynamic pricing.

Key Points to Mention

  • Seat locking mechanisms (e.g., Redis distributed locks, database transactions) to prevent double booking
  • Database schema design: normalization vs denormalization for read-heavy workloads
  • Caching strategies for movie/show data to reduce latency
  • Handling payment failures and ensuring idempotent booking operations
  • Scalability considerations: sharding by region/theater, read replicas, and load balancing
  • Trade-offs between strong consistency (for bookings) and eventual consistency (for search/availability)

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.