Interview guides · Cleartrip
Cleartrip Software Engineer Interview Guide
Cleartrip Software Engineer interview guide: reported rounds, questions and how candidates describe the process.
The 60-second brief
As a Software Engineer at Cleartrip, you are at the heart of one of India’s most influential travel technology platforms. Your work directly impacts how millions of users search, book, and experience travel. You will be tasked with building scalable, reliable, and high-performance services that handle complex transactional data, real-time pricing, and seamless user experiences across web and mobile platforms. This role requires more than just coding proficiency; it demands an architectural mindset. You will contribute to mission-critical systems, ranging from inventory management and booking engines to payment gateways and search algorithms. Whether you are optimizing low-latency flight search APIs or designing resilient microservices, your contributions will directly influence the company’s ability to remain competitive in a fast-paced, high-volume market.
This guide is scoped to a Software Engineer candidate at Cleartrip.
Focus areas
- Data Structures & Algorithms (DSA)
- Problem Solving
- Java (core programming language)
The Cleartrip interview process
Cleartrip candidates report 4 rounds over 3-5 weeks. The stages below are what candidates describe, not a published process.
Online Assessments
Initial assessments to evaluate technical skills and problem-solving abilities.
What to demonstrate
- Initial assessments to evaluate technical skills and problem-solving abilities
- Depth in Data Structures & Algorithms (DSA)
How to prepare
- Answer aloud and timed: Minimum insertion and deletion required to make string A equal to string B.
- Answer aloud and timed: Minimum time to reach from the top-left corner to the bottom-right corner of a grid.
Machine Coding Rounds
Hands-on coding sessions to assess practical coding skills.
What to demonstrate
- Hands-on coding sessions to assess practical coding skills
- Depth in Data Structures & Algorithms (DSA)
How to prepare
- Answer aloud and timed: Implement a solution for Kadane’s algorithm or sub-contiguous array problems.
- Answer aloud and timed: Explain the logic behind your approach for searching in an array of unknown length.
Technical Discussions
In-depth discussions to evaluate technical knowledge and understanding.
What to demonstrate
- In-depth discussions to evaluate technical knowledge and understanding
- Depth in Data Structures & Algorithms (DSA)
How to prepare
- Answer aloud and timed: Solve problems related to trees, graphs, and dynamic programming within a constrained time limit.
- Answer aloud and timed: Design an in-memory Inventory Management System.
Managerial Interviews
Interviews with management to assess fit within the team and company culture.
What to demonstrate
- Interviews with management to assess fit within the team and company culture
- Depth in Data Structures & Algorithms (DSA)
How to prepare
- Answer aloud and timed: Design a banking application covering database schemas, logging, and concurrency.
- Answer aloud and timed: How would you design a caching mechanism for flight fare updates?
Where candidates lose points
Prioritize Code Quality
Even in a time-pressured machine coding round, prioritize clean code. Use meaningful naming conventions and follow standard design patterns.
Think Out Loud
Your interviewer is interested in your thought process. Explain your trade-offs, why you chose a specific algorithm, and how you would handle potential failures.
Stay Calm Under Pressure
If you get stuck, take a breath. Ask for a moment to think or ask the interviewer for a hint. Showing persistence is often more important than getting the answer immediately.
Review Your Projects
Be prepared to discuss the architecture of your past projects in detail, including the challenges you faced and how you overcame them.
Questions & practice
Minimum insertion and deletion required to make string A equal to string B.
Medium · Data Structures and Algorithms
Approach
- Restate the input: its shape, its size, and what is guaranteed about it.
- Name the brute-force solution and its complexity before improving on it.
- Choose the data structure from the access pattern, not from familiarity.
- State the target complexity and say which constraint rules the naive version out.
Follow-up
- How does this change if the input no longer fits in memory?
- What is the worst case, and how likely is it on real data?
Minimum time to reach from the top-left corner to the bottom-right corner of a grid.
Medium · Data Structures and Algorithms
Approach
- Restate the input: its shape, its size, and what is guaranteed about it.
- Name the brute-force solution and its complexity before improving on it.
- Choose the data structure from the access pattern, not from familiarity.
- State the target complexity and say which constraint rules the naive version out.
Follow-up
- How does this change if the input no longer fits in memory?
- What is the worst case, and how likely is it on real data?
Implement a solution for Kadane’s algorithm or sub-contiguous array problems.
Medium · Data Structures and Algorithms
Approach
- Restate the input: its shape, its size, and what is guaranteed about it.
- Name the brute-force solution and its complexity before improving on it.
- Choose the data structure from the access pattern, not from familiarity.
- State the target complexity and say which constraint rules the naive version out.
Follow-up
- How does this change if the input no longer fits in memory?
- What is the worst case, and how likely is it on real data?
Explain the logic behind your approach for searching in an array of unknown length.
Medium · Data Structures and Algorithms
Approach
- Restate the input: its shape, its size, and what is guaranteed about it.
- Name the brute-force solution and its complexity before improving on it.
- Choose the data structure from the access pattern, not from familiarity.
- State the target complexity and say which constraint rules the naive version out.
Follow-up
- How does this change if the input no longer fits in memory?
- What is the worst case, and how likely is it on real data?
Solve problems related to trees, graphs, and dynamic programming within a constrained time limit.
Medium · Data Structures and Algorithms
Approach
- Restate the input: its shape, its size, and what is guaranteed about it.
- Name the brute-force solution and its complexity before improving on it.
- Choose the data structure from the access pattern, not from familiarity.
- State the target complexity and say which constraint rules the naive version out.
Follow-up
- How does this change if the input no longer fits in memory?
- What is the worst case, and how likely is it on real data?
Explain how you would implement multi-threading and loggers in a service.
Medium · System Design and Low-Level Design (LLD)
Approach
- Say what the runtime actually does before reasoning about the code.
- Name what is shared across threads and what owns each piece of state.
- Identify the window where an invariant is briefly untrue.
- Distinguish a value from a reference to it, and say which one you handed out.
Follow-up
- What happens if two callers reach this at the same time?
- Where could this allocate more than you expect?
Replace offset paging on the resource feed with keyset
Easy · keyset pagination · composite index · sort order
resource holds resource_id, tenant_id, owner_user_id, title, body_ref, version, status ('draft','active','archived','deleted'), created_at, updated_at, deleted_at, with an index on (tenant_id, status, updated_at DESC, resource_id DESC). The listing endpoint returns active resources for one tenant, newest update first, 50 per page, today with LIMIT 50 OFFSET n. Tenants reach page 400 and rows are created while they read. Write the keyset query, define what the cursor carries and how it is encoded, and say which part of the index each predicate uses. Assume PostgreSQL 16.
Approach
- Name the two failures separately. OFFSET 20000 makes the server produce and discard 20,000 rows, so page cost grows with depth rather than with page size. Independently, any write that changes how many rows sort above the offset moves the window between two fetches, and the direction decides which anomaly you get: an insert lands at the head of updated_at DESC and pushes already-returned rows down past the boundary, so they are returned a second time; a delete above the offset, or a row whose updated_at is bumped above the cursor, pulls rows up and one is never returned at all. Nothing in the response reveals either.
- Write the seek: WHERE tenant_id = $1 AND status = 'active' AND (updated_at, resource_id) < ($2, $3) ORDER BY updated_at DESC, resource_id DESC LIMIT 50. The row-value comparison is one index range rather than a disjunction, and both columns are NOT NULL, which is what makes that comparison well defined.
- Map each predicate onto the index: tenant_id and status are equality on the leading columns, (updated_at, resource_id) is the range, and the ORDER BY matches the index order so no Sort node appears and the scan stops after 50 rows. The DESC in the definition only matters for mixed directions — a plain ascending btree on the same columns is read backwards for this query.
- Put both sort columns in the cursor and nothing the client can tamper with into another tenant: base64 of (updated_at, resource_id), validated server-side, with tenant_id taken from the principal.
Follow-up
- The client asks for 'jump to page 400'. What do you offer instead, and what does the honest version cost?
- Sort order becomes user-selectable across four columns. How many indexes is that, and which would you refuse to add?
Write the update path that detects a concurrent edit
Medium · optimistic concurrency · transactional outbox · audit history
resource carries version INT NOT NULL DEFAULT 1. resource_revision holds revision_id, resource_id, version, actor_user_id, change_kind, patch JSONB, request_id, created_at with UNIQUE (resource_id, version). outbox_event holds aggregate_type, aggregate_id, aggregate_version, event_type, payload, status. A PUT carries the version the client read. Write the exact statements for the single transaction that applies the edit, records the revision and enqueues 'resource.updated', and give the handler's branch on zero affected rows. Then say what PostgreSQL 16 does under READ COMMITTED when two of these updates hit one row at once.
Approach
- One transaction, three writes, no network call inside it: UPDATE resource SET title = $3, version = version + 1, updated_at = now() WHERE resource_id = $1 AND tenant_id = $4 AND version = $2; then INSERT the resource_revision row at version $2 + 1; then INSERT the outbox_event row at the same aggregate_version. The event goes to a table rather than a broker because no transaction spans both.
- Branch on the affected-row count before doing anything else. Zero has three causes — stale version, wrong tenant, row gone — so re-read once and map to 409 carrying the current version, or 404 for an id outside the caller's tenant, which also stops the endpoint confirming that another tenant's id exists.
- State the engine behaviour instead of assuming it. Under READ COMMITTED the second UPDATE blocks on the row lock, and when the first commits PostgreSQL re-evaluates the WHERE clause against the newly committed row, so the version predicate now fails and the statement reports zero rows. Under REPEATABLE READ the identical collision raises SQLSTATE 40001 instead, so the handler must fold both shapes into one conflict response.
- Keep UNIQUE (resource_id, version) even though the predicate already serialises writers. It is what makes a lost update unwritable if any other path ever reaches the revision table, and it converts a logic bug into 23505 rather than into a silently missing history row.
Follow-up
- A client sends the version it read ten minutes ago and the resource has moved three versions. What is in your 409 so it can resolve the conflict without a full re-fetch?
- Two editors, two disjoint fields, no overlap. Does your answer still refuse the second write, and should it?
Design an in-memory Inventory Management System.
Medium · System Design and Low-Level Design (LLD)
Approach
- Fix the scope first: who calls this, how often, and what they do when it fails.
- Name the read and write paths separately; they rarely have the same bottleneck.
- Choose a partition key and say what query it makes expensive.
- State the consistency you need, and where you are willing to be stale.
Follow-up
- What breaks first when traffic grows ten times?
- How does this behave when that dependency is down for an hour?
Design a banking application covering database schemas, logging, and concurrency.
Medium · System Design and Low-Level Design (LLD)
Approach
- Fix the scope first: who calls this, how often, and what they do when it fails.
- Name the read and write paths separately; they rarely have the same bottleneck.
- Choose a partition key and say what query it makes expensive.
- State the consistency you need, and where you are willing to be stale.
Follow-up
- What breaks first when traffic grows ten times?
- How does this behave when that dependency is down for an hour?
How would you design a caching mechanism for flight fare updates?
Medium · System Design and Low-Level Design (LLD)
Approach
- Fix the scope first: who calls this, how often, and what they do when it fails.
- Name the read and write paths separately; they rarely have the same bottleneck.
- Choose a partition key and say what query it makes expensive.
- State the consistency you need, and where you are willing to be stale.
Follow-up
- What breaks first when traffic grows ten times?
- How does this behave when that dependency is down for an hour?
Discuss the architecture required to support highly scaled applications.
Medium · System Design and Low-Level Design (LLD)
Approach
- Fix the scope first: who calls this, how often, and what they do when it fails.
- Name the read and write paths separately; they rarely have the same bottleneck.
- Choose a partition key and say what query it makes expensive.
- State the consistency you need, and where you are willing to be stale.
Follow-up
- What breaks first when traffic grows ten times?
- How does this behave when that dependency is down for an hour?
Walk through the architecture of a project you have previously worked on.
Medium · Project and Behavioral
Approach
- Fix the scope first: who calls this, how often, and what they do when it fails.
- Name the read and write paths separately; they rarely have the same bottleneck.
- Choose a partition key and say what query it makes expensive.
- State the consistency you need, and where you are willing to be stale.
Follow-up
- What breaks first when traffic grows ten times?
- How does this behave when that dependency is down for an hour?
Describe how you handle production-level issues and debugging.
Medium · Project and Behavioral
Approach
- Establish what changed and when, before forming any theory.
- Pick a bisection that eliminates candidates whichever way it turns out.
- Check the instrumentation before believing the symptom.
- Separate the trigger from the cause; the deploy is rarely the bug.
Follow-up
- What would you look at first, and what would it rule out?
- How would you tell a cause from a coincidence here?
Suggested practice checklist
Built from the rounds and topics Cleartrip candidates report.
Day 1 — Map the Cleartrip loop
- Write out the reported sequence: Online Assessments, Machine Coding Rounds, Technical Discussions, Managerial Interviews.
- For each round, write one sentence on what it is judging, from the description above, and mark the one you are least ready for.
Deliverable: A one-page map of the 4 reported rounds, with the weakest marked.
Day 2 — Work Data Structures & Algorithms (DSA)
- Spend the session on Data Structures & Algorithms (DSA), which Cleartrip candidates report being tested on.
- Write one worked example in Data Structures & Algorithms (DSA) and time yourself on it.
Deliverable: One timed worked example in Data Structures & Algorithms (DSA).
Day 3 — Work Problem Solving
- Spend the session on Problem Solving, which Cleartrip candidates report being tested on.
- Write one worked example in Problem Solving and time yourself on it.
Deliverable: One timed worked example in Problem Solving.
Day 4 — Work Java (core programming language)
- Spend the session on Java (core programming language), which Cleartrip candidates report being tested on.
- Write one worked example in Java (core programming language) and time yourself on it.
Deliverable: One timed worked example in Java (core programming language).
Day 5 — Answer out loud: Data Structures and Algorithms
- Answer aloud, timed: Minimum insertion and deletion required to make string A equal to string B.
- Answer aloud, timed: Minimum time to reach from the top-left corner to the bottom-right corner of a grid.
Deliverable: Spoken answers to 2 reported Data Structures and Algorithms question(s), under time.
Day 6 — Answer out loud: System Design and Low-Level Design (LLD)
- Answer aloud, timed: Design an in-memory Inventory Management System.
- Answer aloud, timed: Design a banking application covering database schemas, logging, and concurrency.
Deliverable: Spoken answers to 2 reported System Design and Low-Level Design (LLD) question(s), under time.
Day 7 — Answer out loud: Project and Behavioral
- Answer aloud, timed: Walk through the architecture of a project you have previously worked on.
- Answer aloud, timed: Describe how you handle production-level issues and debugging.
Deliverable: Spoken answers to 2 reported Project and Behavioral question(s), under time.
Behavioural preparation
Behavioural rounds judge the decision you made and what it cost.
Explain a time you had to make a trade-off between speed and code quality.
Medium · Project and Behavioral
Approach
- Pick a story where you made the decision, not one where you watched it.
- State the situation in two sentences and spend the rest on the reasoning.
- Give the blast radius: what could have broken, and what you measured.
- Name the disagreement and how you resolved it with evidence.
Follow-up
- What would you do differently if you ran that again?
- How did you know your change caused the improvement?
How do you approach learning new technologies or frameworks outside your current scope?
Medium · Project and Behavioral
Approach
- Pick a story where you made the decision, not one where you watched it.
- State the situation in two sentences and spend the rest on the reasoning.
- Give the blast radius: what could have broken, and what you measured.
- Name the disagreement and how you resolved it with evidence.
Follow-up
- What would you do differently if you ran that again?
- How did you know your change caused the improvement?
Why do you want to work at Cleartrip, and how do your values align with our engineering culture?
Medium · Project and Behavioral
Approach
- Pick a story where you made the decision, not one where you watched it.
- State the situation in two sentences and spend the rest on the reasoning.
- Give the blast radius: what could have broken, and what you measured.
- Name the disagreement and how you resolved it with evidence.
Follow-up
- What would you do differently if you ran that again?
- How did you know your change caused the improvement?