Expedia interview questions & answers

20 real Expedia interview questions with full model answers — System design, Behavioral, Technical, Product & growth. Drawn from the same verified bank ChannelPulse drills from (171 Expedia questions in total).

BehavioralEasyExpedia

1. Tell me about a time when you worked on a team project.

The full question

Tell me about a time when you worked on a team project. What role did you play, and how did you contribute to the team's success?

Model answer

Situation

In my previous role as a software engineer at a mid-sized tech company, I was part of a team tasked with developing a new feature for our flagship product. The project was critical as it aimed to enhance user engagement by introducing a personalized recommendation system. Our team consisted of five engineers, a product manager, and a UX designer. The stakes were high because the feature was expected to drive a 15% increase in user retention, which was a key performance metric for the quarter.

Task

My specific responsibility was to lead the backend development, ensuring that the recommendation algorithms were efficiently integrated with our existing infrastructure. A major constraint was the tight deadline; we had just eight weeks to deliver a fully functional feature.

Action

  • I began by organizing a kickoff meeting to align the team on the project goals and timelines. This helped us identify potential bottlenecks early on.
  • I took the initiative to design the system architecture, focusing on scalability and performance. I chose to implement a microservices architecture to allow independent deployment and scaling of the recommendation engine.
  • To ensure seamless integration, I collaborated closely with the frontend team, setting up regular sync meetings to address any integration issues promptly.
  • I also introduced code review sessions to maintain high code quality and shared best practices for optimizing the algorithms, which improved our processing speed by 20%.
  • Recognizing the importance of data accuracy, I worked with the data engineering team to refine our data pipelines, ensuring that the recommendation engine received real-time data updates.
  • Throughout the project, I maintained open communication with the product manager and UX designer, incorporating their feedback to align the technical implementation with user experience goals.

Result

The project was completed on time, and the new feature was launched successfully. It exceeded expectations, resulting in a 20% increase in user retention, surpassing our initial target. This success was a testament to the effective collaboration and communication within the team. I learned the importance of proactive leadership and cross-functional collaboration in driving project success. This experience reinforced my belief in the value of maintaining open channels of communication and the impact of a well-coordinated team effort.

BehavioralEasyExpediaGroup Product Manager

2. How have you helped a teammate in need?

Model answer

Situation — At a previous company, a product manager on a neighboring team was unexpectedly asked to cover a launch after a teammate went on leave. They were capable, but were juggling executive updates, unresolved dependencies, and their own roadmap; the launch was at risk of slipping and the strain was becoming visible.

Task — I wanted to help them regain control without taking over their work or creating confusion about ownership. I also had to protect my own team’s commitments, so I needed to offer focused help rather than an open-ended promise.

Action

  • I checked in privately and asked what was most urgent, what they wanted me to own, and what should remain theirs. That mattered because “help” can feel like criticism if you assume what someone needs.
  • We made a short list of launch-critical decisions and dependencies, separating true blockers from work that could wait. I offered to own two concrete items: coordinating a review with Engineering and preparing the first draft of the leadership update.
  • I used my relationships with Design and Data to get answers quickly, while keeping the teammate copied and giving them the final say on product trade-offs.
  • When a scope request threatened the date, I helped them frame options—ship the core experience on time, or delay for the additional feature—with customer impact and effort made explicit. They led the decision in the review.
  • I set a brief daily check-in for that week, then stepped back once the launch plan and ownership were stable. I also aligned with my manager so the temporary support did not silently displace my team’s priorities.

Result — The team launched the core experience on schedule, and the teammate was able to focus on the product decisions only they could make. We later reused the dependency checklist for other launches. I learned that effective support is specific, time-bounded, and preserves the other person’s agency.

What interviewers listen for

  • Empathy without rescuing or taking credit.
  • Clear boundaries and ownership.
  • A tangible outcome for both the person and the organization.
BehavioralMediumExpediaGroup Product Manager

3. Tell me about a time you facilitated collaboration between engineers, data scientists, and other stakeholders.

Model answer

Situation

At a marketplace company, we were trying to reduce failed first purchases, but the evidence was scattered: support teams heard one set of complaints, product analytics showed another, and engineering had concerns about checkout reliability. I was the Group PM responsible for the purchase experience, working across two engineering teams, data science, design, and operations.

Task

I needed to align the group on the highest-impact problem and get to a measurable improvement without creating a checkout change that increased payment failures or operational burden.

Action

  • I started by writing a shared problem statement and a decision brief, distinguishing what we knew from what we were assuming. I asked data science to validate where users dropped out, while support and operations categorized recent customer complaints.
  • I set up a short working session with engineering, data science, design, and operations. Rather than debate solutions, we reviewed the same funnel, customer examples, and system constraints. That surfaced an address-validation issue affecting a specific segment, not a general checkout usability problem.
  • I clarified ownership: data science owned the analysis and experiment design, engineering owned the technical options and reliability assessment, and product and design owned the customer problem and interaction proposal.
  • When the initial proposal risked adding latency to every checkout, I worked with engineering to compare a synchronous check with an asynchronous warning. We chose the lower-risk approach for the initial release and agreed on a follow-up if the results justified deeper investment.
  • I translated the decision into a one-page plan with success metrics, guardrails, decision dates, and named owners, then shared weekly updates so partner teams could raise risks early.

Result

The team shipped the targeted change and improved first-purchase completion by 8% for the affected segment, with no material increase in payment errors or checkout latency. Just as importantly, the shared decision process reduced rework and gave the teams a reusable way to resolve cross-functional disagreements. I learned that collaboration improves when people are aligned on evidence, decision rights, and constraints—not just invited to the same meeting.

What interviewers listen for

  • You created alignment across disciplines without taking over their expertise.
  • You made ownership and decision-making explicit.
  • You balanced customer impact with technical and operational risk.
  • You can point to measurable outcomes and organizational learning.
BehavioralMediumExpediaEngineering Manager

4. How do you handle disagreements between senior engineers about architectural decisions?

Model answer

Situation

On a platform redesign, two senior engineers disagreed about whether to adopt a shared event-driven service or keep a simpler synchronous interface. One favored the event model for independent scaling and future use cases; the other argued that our current team could operate the synchronous design more safely. The decision affected several product teams, on-call burden, and a committed delivery date, so I treated it as an organizational decision—not a contest between senior people.

Task

I needed to help the engineers reach a decision grounded in requirements and evidence, preserve their working relationship, and make ownership clear. We also needed to avoid extending the debate until it put the delivery at risk.

Action

  • I met with each engineer first to understand their assumptions and what evidence would change their view. I asked them to distinguish hard requirements—such as latency, availability, and replay needs—from preferences about architecture.
  • I brought the discussion into a design review with the relevant service owners. We agreed on evaluation criteria: expected throughput, failure isolation, operational complexity, delivery cost, and reversibility. I made sure quieter engineers and the on-call team could contribute.
  • I asked both engineers to document a small number of options and their failure modes. We compared them against measured traffic and a prototype rather than debating hypothetical scale. The event design offered useful decoupling, but introduced queue operations, eventual consistency, and new ownership work we did not yet have capacity to support.
  • We chose a synchronous first version with explicit timeouts, idempotency, and a stable interface, while keeping the boundary compatible with an event-based migration later. I recorded the decision, the assumptions, and the signals that would trigger reconsideration.
  • I assigned one engineer to lead implementation and the other to review reliability and migration hooks. I checked in afterward to confirm the decision was understood, even by the engineer whose preferred option was not selected.

Result

The team delivered on the agreed date, met its latency target, and avoided taking on queue operations before there was a clear need. When traffic later crossed the threshold we had documented, we revisited the decision using production data rather than reopening the original argument. I learned that a good architectural decision process makes disagreement productive: establish shared criteria, choose a reversible path where possible, and make one accountable owner responsible for the outcome.

CodingEasyExpediaSoftware Engineer

5. Find the Index of the First Occurrence in a String (LeetCode)

Model answer

The task

Given a text string and a pattern string, return the starting index of the pattern’s first occurrence in the text. Return -1 if it does not occur; an empty pattern matches at index 0.

Key idea

Use Knuth–Morris–Pratt (KMP). Its prefix table lets the search reuse information about matched characters instead of restarting from scratch after a mismatch.

Approach

  1. Build a prefix table for the pattern. At each position, it records the length of the longest proper prefix that is also a suffix.
  2. Scan the text while tracking how many pattern characters currently match.
  3. On a mismatch, use the prefix table to find the next viable match length.
  4. Return the match’s starting index when the entire pattern matches; otherwise return -1.
class Solution:
    def strStr(self, haystack: str, needle: str) -> int:
        if not needle:
            return 0

        # Build the longest-prefix-suffix table for needle.
        lps = [0] * len(needle)
        prefix_len = 0
        i = 1

        while i < len(needle):
            if needle[i] == needle[prefix_len]:
                prefix_len += 1
                lps[i] = prefix_len
                i += 1
            elif prefix_len > 0:
                prefix_len = lps[prefix_len - 1]
            else:
                i += 1

        # Search haystack without rechecking matched characters.
        text_i = 0
        pattern_i = 0

        while text_i < len(haystack):
            if haystack[text_i] == needle[pattern_i]:
                text_i += 1
                pattern_i += 1

                if pattern_i == len(needle):
                    return text_i - pattern_i
            elif pattern_i > 0:
                pattern_i = lps[pattern_i - 1]
            else:
                text_i += 1

        return -1

Complexity:

  • Time: O(n + m), where n and m are the text and pattern lengths.
  • Space: O(m), for the prefix table.

Common follow-ups

  • How would you handle many pattern searches in the same text? Build an index or use a multi-pattern algorithm such as Aho–Corasick.
  • What if the text arrives as a stream? Keep the KMP match state and prefix table between chunks.
  • How would you find all occurrences? After each full match, record its start and reset the pattern index using the final prefix-table value.
CodingEasyExpediaSoftware Engineer

6. Roman to Integer (LeetCode)

Model answer

The task

Convert a string of Roman numeral symbols into its integer value. Roman numerals use a small set of symbols, with some smaller values placed before larger ones to indicate subtraction.

Key idea

Scan the string from left to right, comparing each symbol’s value with the next one. If the current value is smaller, subtract it; otherwise, add it. This handles subtractive pairs without needing to process them separately.

Approach

  1. Store the integer value for each Roman numeral symbol in a lookup table.
  2. Initialize a running total to zero.
  3. For each symbol, compare its value with the following symbol’s value, if one exists.
  4. Subtract the current value when it is smaller than the next value; otherwise, add it.
  5. Return the total. This assumes the input is a valid Roman numeral.
class Solution:
    def romanToInt(self, s: str) -> int:
        values = {
            "I": 1,
            "V": 5,
            "X": 10,
            "L": 50,
            "C": 100,
            "D": 500,
            "M": 1000,
        }

        total = 0

        for i, symbol in enumerate(s):
            current = values[symbol]

            # A smaller value before a larger value is subtracted.
            if i + 1 < len(s) and current < values[s[i + 1]]:
                total -= current
            else:
                total += current

        return total

Complexity: Time: O(n), where n is the string length, since each symbol is visited once.

Complexity: Space: O(1), because the lookup table has a fixed number of entries.

Common follow-ups

  • How would you handle invalid Roman numeral strings? Validate symbol order and repetition rules before or during conversion.
  • How would you convert an integer to a Roman numeral? Greedily subtract from a descending list of allowed values, including subtractive pairs.
  • Can the conversion be done scanning right to left? Yes; subtract a value if it is smaller than the largest value already seen to its right, otherwise add it.
CodingEasyExpediaSoftware Engineer

7. Count Vowel Substrings of a String (LeetCode)

Model answer

The task

Count substrings made entirely of vowels that contain each of the five vowels at least once.

Key idea

For each ending position, keep the most recent position of every vowel in the current uninterrupted vowel segment. If all five have appeared, the earliest valid start is one position after the smallest of those last positions.

Approach

  1. Scan the string from left to right.
  2. When a consonant appears, mark the start of the new vowel-only segment and clear the last-seen positions.
  3. For a vowel, update its last-seen position.
  4. Once all five vowels have been seen in this segment, add the number of valid starting positions for this ending position.
class Solution:
    def countVowelSubstrings(self, word: str) -> int:
        vowels = set("aeiou")
        last_seen = {}
        segment_start = 0
        total = 0

        for right, char in enumerate(word):
            if char not in vowels:
                # Substrings cannot cross a consonant.
                segment_start = right + 1
                last_seen.clear()
                continue

            last_seen[char] = right

            if len(last_seen) == 5:
                # Any start from segment_start through the earliest
                # last-seen vowel produces a substring with all five.
                earliest_last_seen = min(last_seen.values())
                total += earliest_last_seen - segment_start + 1

        return total

Complexity:

  • Time: O(n), since each character is processed once and at most five positions are checked.
  • Space: O(1), as the map stores positions for at most five vowels.

Common follow-ups

  • What if vowels are case-insensitive? Normalize each character before testing it.
  • What if the required vowel set changes? Replace the fixed vowel set and require all its members to be present.
  • How would you count substrings with at least k distinct vowels? Track vowel frequencies and use a sliding-window count.
CodingEasyExpediaSoftware Engineer

8. Valid Word (LeetCode)

Model answer

The task

Decide whether a string is a valid word: it must have at least three characters, contain only English letters or digits, and include at least one vowel and one consonant.

Key idea

Scan the string once, rejecting any character that is not an ASCII letter or digit. During the scan, track whether a vowel and a consonant have appeared; digits satisfy neither condition.

Approach

  1. Return False if the string is shorter than three characters.
  2. Initialize flags for whether a vowel and a consonant have been seen.
  3. For each character, check that it is an ASCII letter or digit.
  4. For letters, update the appropriate flag, ignoring case.
  5. Return True only if both flags are set.
class Solution:
    def isValid(self, word: str) -> bool:
        if len(word) < 3:
            return False

        vowels = set("aeiou")
        has_vowel = False
        has_consonant = False

        for char in word:
            is_ascii_letter = (
                "a" <= char <= "z" or "A" <= char <= "Z"
            )
            is_ascii_digit = "0" <= char <= "9"

            if not is_ascii_letter and not is_ascii_digit:
                return False

            if is_ascii_letter:
                if char.lower() in vowels:
                    has_vowel = True
                else:
                    has_consonant = True

        return has_vowel and has_consonant

Complexity:

  • Time: O(n), where n is the length of the string.
  • Space: O(1), since the vowel set and tracking flags have fixed size.

Common follow-ups

  • How would you handle Unicode letters? Define the permitted character categories explicitly, then use Unicode-aware classification.
  • Can you stop early? Yes, once both letter types have appeared, any remaining characters need only be checked for validity.
  • What if the vowel set changes? Store the allowed vowels in a configurable set and use the same scan.
Product & growthEasyExpediaProduct Analyst

9. Investigate LA successful orders drop

Model answer

Clarify

To investigate the drop in successful orders in Los Angeles, we need to first understand the context. Are we looking at a specific time period, product category, or customer segment? Additionally, it's important to define what constitutes a 'successful order' — is it an order that has been paid for, shipped, or delivered?

Define Metric(s)

The primary metric is the number of successful orders in Los Angeles over the specified period. Secondary metrics could include conversion rates, average order value, and cart abandonment rates.

Break Down

We can break down the problem using a funnel analysis:

funnel
    title Order Funnel
    section Visitors
    Total Visitors: 100%
    section Add to Cart
    Added to Cart: 60%
    section Checkout Initiated
    Checkout Initiated: 40%
    section Payment Successful
    Payment Successful: 30%
    section Order Delivered
    Order Delivered: 25%
Diagram

By analyzing each stage of the funnel, we can identify where the drop-off is most significant.

Hypotheses

  1. Technical Issues: There might be bugs or issues in the checkout process, leading to cart abandonment.
  2. Payment Failures: A high rate of payment failures could be causing the drop.
  3. Inventory Issues: Stockouts or delays in shipping specific to the LA region.
  4. Marketing Changes: Recent changes in marketing strategies might have impacted the conversion rate.
  5. External Factors: Economic or environmental factors affecting consumer behavior in LA.

How to Investigate

  • Data Analysis: Use analytics tools to track user behavior through the funnel and identify where the drop-off is occurring.
  • A/B Testing: Test different checkout flows to see if changes improve conversion rates.
  • User Feedback: Gather feedback from LA customers to understand their experience and pain points.
  • Technical Audit: Conduct a thorough audit of the order processing system to identify any technical issues.

Decision & Guardrails

Based on the investigation, decide on the most impactful changes to implement. Set guardrails by monitoring key metrics to ensure changes lead to improvement without negatively affecting other areas. Regularly review the metrics post-implementation to ensure sustained improvement.

Product & growthEasyExpediaProduct Manager

10. What is your favorite travel-related product or service, and why?

Model answer

Introduction: One of my favorite travel-related products is Google Maps. It’s an essential tool for both planning and navigating trips.

User Empathy & Benefits:

  • Navigation: Provides reliable directions for driving, walking, and public transit.
  • Discoverability: Helps users discover local attractions, restaurants, and amenities.
  • Real-time Updates: Offers live traffic conditions and estimated travel times.

Success Factors:

  • User-centric Design: Intuitive interface and easy-to-use features.
  • Comprehensive Data: Extensive database of locations and user reviews.
  • Continuous Improvement: Regular updates and integration of new features like AR navigation.

Conclusion: Google Maps enhances the travel experience by making navigation and exploration effortless, which is why it stands out as my favorite travel-related product.

Product & growthMediumExpediaSenior Engineering Manager

11. How would you investigate a drop in booking conversion?

Model answer

Clarify & scope

I’d first confirm what “booking conversion” means: the share of eligible users who complete a booking, over what time window, and on which platforms and markets. I’d separate a real change in user behavior from changes in traffic mix, tracking, booking eligibility, or the denominator. I’d compare against the same weekdays and seasonality, and establish when the drop began.

Define metric(s)

My primary metric would be completed bookings divided by users who entered the booking funnel, using a consistent cohort and attribution window. I’d also inspect step-level conversion—search to results, results to detail, detail to checkout, and checkout to confirmation—alongside booking volume, revenue, cancellation rate, and error rate. I’d use confidence intervals and practical impact, not just statistical significance.

Break down

flowchart LR
  A[Eligible visitors] --> B[Search]
  B --> C[Results]
  C --> D[Booking details]
  D --> E[Checkout]
  E --> F[Confirmation]
Diagram

I’d segment each step by platform and app version, market, acquisition channel, new versus returning users, inventory type, and payment method. I’d look for where the decline starts and whether it is broad or concentrated—for example, a mobile checkout drop after a new release is more actionable than an aggregate decline explained by lower-intent traffic.

Hypotheses

I’d rank hypotheses by evidence and likely impact: (1) instrumentation or denominator changed; (2) a technical regression such as latency, crashes, or payment failures; (3) inventory, pricing, or availability changed; (4) a product or policy change introduced friction; or (5) traffic mix shifted. I’d avoid assuming the most visible product change caused the drop.

How I’d investigate

I’d validate event definitions against backend booking records, inspect deployment and experiment timelines, and compare affected cohorts with unaffected ones. I’d review latency, errors, inventory availability, price changes, and payment authorization by funnel step. If the evidence points to a release, I’d use a holdout or rollback where safe; otherwise, I’d run a focused experiment. I’d partner with data, engineering, and operations to distinguish correlation from cause.

Decision & guardrails

I’d prioritize the fix with the largest expected recovery and lowest risk, then monitor conversion, successful bookings, revenue per visitor, cancellations, payment failures, and customer support contacts. I’d communicate the size and confidence of the impact, what remains uncertain, and who owns the follow-up.

Product & growthMediumExpediaEngineering Manager

12. How do you decide when to pay down technical debt versus delivering new product features?

Model answer

Clarify & scope

I treat technical debt and feature delivery as competing investments in customer and business outcomes—not as “engineering work” versus “product work.” I first clarify the product goals, commitments, and time horizon, then ask which debt is measurably slowing delivery, increasing risk, or harming users.

User segments & pain points

I consider both external users and internal users of the platform. For example, customers may experience slow checkout or errors, while engineers may need several days to safely change a tightly coupled service. I prioritize debt that affects a high-value customer journey, creates operational risk, or is a recurring constraint for multiple teams.

Goals & success metrics

The North Star is sustainable delivery of customer value. I track feature outcomes alongside indicators such as lead time, change failure rate, incident frequency, on-call load, build time, and the time spent on workarounds. A debt item needs a clear expected benefit; “the code is ugly” is not enough on its own.

Solutions

I usually consider three options: ship the feature as-is, pay down the debt first, or take a thin-slice approach that delivers the feature while improving the relevant seam. For example, if a legacy pricing service makes every promotion risky, I might isolate the promotion logic behind an interface, add contract tests, and then ship the first promotion without attempting a full rewrite.

Recommendation: I compare the options by customer impact, urgency, risk reduction, cost of delay, and reversibility. I favor targeted debt work when it removes a proven bottleneck or reduces a material reliability or security risk. I favor feature delivery when the opportunity is time-sensitive and the debt is contained. I avoid broad rewrites without incremental validation.

Prioritization & trade-offs

I make the trade-off visible with product and engineering partners, including what slips and what risk we accept. I might reserve capacity for reliability work, but I do not treat a fixed percentage as a substitute for prioritization. For a high-impact debt item, I show the cost of continuing to defer it—for example, repeated incidents or a measurable increase in feature lead time.

MVP, measurement & rollout

I break debt work into a bounded milestone, baseline the relevant metrics, and review the result after delivery. If it does not improve the bottleneck, I adjust the plan. I communicate the decision in customer and business terms, and revisit it as roadmap priorities or risk change.

System designEasyExpedia

13. Design a simple hotel booking system.

The full question

Design a simple hotel booking system. What are the key components?

Model answer

1. Requirements & scale

Functional Requirements:

  • Users can search for hotels based on location, date, and other filters.
  • Users can view hotel details, including availability and pricing.
  • Users can book a hotel room.
  • Users can cancel a booking.
  • Users receive booking confirmation via email.

Non-Functional Requirements:

  • The system should be highly available and responsive.
  • It should handle a large number of concurrent users.
  • Data consistency is crucial, especially for booking transactions.
  • The system should be scalable to accommodate peak travel seasons.

Estimates:

  • Assume 10,000 searches per second (QPS) during peak times.
  • Assume 1,000 bookings per second.
  • Average hotel data size: 1 KB; booking data size: 500 bytes.
  • Storage: 100,000 hotels 1 KB = 100 MB; 1 million bookings/day 500 bytes = ~500 MB/day.

2. High-level architecture

flowchart TD
    subgraph Client
        A[User Devices]
    end

    subgraph Edge/CDN
        B[CDN]
    end

    subgraph Load Balancer
        C[Load Balancer]
    end

    subgraph API / Services
        D[Search Service]
        E[Booking Service]
        F[User Service]
    end

    subgraph Cache
        G[Redis Cache]
    end

    subgraph Datastores
        H["SQL DB (Hotel, Booking)"]
        I["NoSQL DB (User)"]
    end

    subgraph Message Queue
        J[Booking Queue]
    end

    subgraph Workers
        K[Email Worker]
    end

    A --> B --> C --> D
    C --> E
    C --> F
    D --> G
    E --> G
    G --> H
    E --> J
    J --> K
    K --> F
Diagram

3. API design

  • GET /hotels/search: Search hotels based on criteria.
  • GET /hotels/{id}: Retrieve hotel details.
  • POST /bookings: Create a new booking.
  • DELETE /bookings/{id}: Cancel a booking.
  • GET /users/{id}: Retrieve user information.

4. Data model & storage

Datastores:

  • SQL Database: Used for hotel and booking data to ensure ACID properties.
  • NoSQL Database: Used for user data to handle flexible schema and high read/write throughput.

Key Tables:

  • Hotel Table: hotel_id (Primary Key), name, location, rooms, price.
  • Booking Table: booking_id (Primary Key), user_id, hotel_id, check_in, check_out, status.
  • User Collection: user_id (Partition Key), name, email, preferences.

5. Deep dive

The core of the hotel booking system is the booking process, which must ensure data consistency and handle high concurrency. Here's how a booking transaction might work:

sequenceDiagram
    participant U as User
    participant S as Booking Service
    participant DB as SQL DB
    participant MQ as Message Queue
    participant W as Email Worker

    U->>S: POST /bookings
    S->>DB: Check room availability
    alt Room available
        S->>DB: Create booking record
        S->>MQ: Send booking confirmation
        MQ->>W: Process email
        W->>U: Send confirmation email
    else Room not available
        S->>U: Return error
    end
Diagram

6. Scale, bottlenecks & trade-offs

Scaling:

  • Horizontal Scaling: Use load balancers to distribute incoming requests across multiple service instances.
  • Caching: Use Redis to cache frequently accessed hotel data to reduce database load.
  • Database Sharding: Shard the SQL database by hotel ID to distribute load and improve performance.

Bottlenecks:

  • Database: The SQL database can become a bottleneck during peak booking times. Implementing read replicas can help distribute read load.
  • Message Queue: Ensure the message queue can handle peak booking confirmation messages to prevent delays.

Trade-offs:

  • Consistency vs. Availability: Prioritize consistency for booking transactions to prevent overbooking, at the potential cost of availability during network partitions (CAP theorem).
  • Push vs. Pull: Use push notifications for booking confirmations to ensure timely delivery.
  • SQL vs. NoSQL: Use SQL for transactions requiring strong consistency and NoSQL for flexible, high-volume user data.

This design ensures a robust, scalable, and consistent hotel booking system capable of handling high traffic and complex transactions.

System designMediumExpedia

14. Design a system to manage flight availability and pricing in real-time.

Model answer

1. Requirements & scale

Functional Requirements:

  • Real-time updates of flight availability and pricing.
  • Support for querying flight information by users.
  • Ability to handle updates from multiple airlines.
  • Provide consistent and accurate data to users.

Non-Functional Requirements:

  • High availability and low latency.
  • Scalability to handle peak loads.
  • Fault tolerance and data consistency.
  • Secure data access and storage.

Estimates:

  • Queries Per Second (QPS): Assume 10,000 concurrent users with each making an average of 1 request per minute. This results in approximately 167 QPS.
  • Storage: If each flight data entry is 1 KB and there are 10,000 flights updated daily, storing a month's data requires approximately 300 MB.
  • Bandwidth: Assuming each response is 1 KB, the bandwidth requirement is about 167 KB/s.

2. High-level architecture

flowchart TD
    subgraph Client
        A[User Devices]
    end
    subgraph Edge/CDN
        B[CDN]
    end
    subgraph Load Balancer
        C[Load Balancer]
    end
    subgraph API / Services
        D[Flight Service API]
        E[Pricing Service API]
    end
    subgraph Cache
        F[Redis Cache]
    end
    subgraph Datastores
        G[SQL Database]
        H[NoSQL Database]
    end
    subgraph Message Queue
        I[Kafka]
    end
    subgraph Workers
        J[Update Workers]
    end

    A --> B
    B --> C
    C --> D
    C --> E
    D --> F
    E --> F
    F --> G
    F --> H
    I --> J
    J --> G
    J --> H
    J --> F
Diagram

3. API design

  • GET /flights: Retrieve available flights based on search criteria (e.g., origin, destination, date).
  • GET /flights/{id}: Get detailed information about a specific flight.
  • POST /flights/update: Endpoint for airlines to update flight availability and pricing.
  • GET /pricing/{flightId}: Retrieve current pricing for a specific flight.

4. Data model & storage

Datastores:

  • SQL Database: Used for transactional data and ensuring ACID properties for flight bookings.
  • NoSQL Database: Used for storing flight availability and pricing data to handle high read/write throughput.

Key Tables:

  • Flights Table (SQL): flight_id, origin, destination, departure_time, arrival_time.
  • Pricing Table (NoSQL): flight_id, price, currency, last_updated.

Partition Key:

  • For NoSQL, use flight_id as the partition key to distribute data evenly across the database.

5. Deep dive

The core of this system is the real-time update mechanism for flight availability and pricing. Airlines push updates to the system via the POST /flights/update endpoint. These updates are published to a Kafka topic, which ensures high throughput and fault tolerance.

sequenceDiagram
    participant Airline
    participant FlightAPI as Flight Service API
    participant Kafka
    participant Worker as Update Worker
    participant Cache as Redis Cache
    participant SQLDB as SQL Database
    participant NoSQLDB as NoSQL Database

    Airline->>FlightAPI: POST /flights/update
    FlightAPI->>Kafka: Publish update message
    Kafka->>Worker: Consume update message
    Worker->>Cache: Update cache
    Worker->>SQLDB: Update transactional data
    Worker->>NoSQLDB: Update availability and pricing
Diagram

6. Scale, bottlenecks & trade-offs

Replication and Sharding:

  • SQL Database: Use master-slave replication to ensure high availability and read scalability.
  • NoSQL Database: Employ sharding based on flight_id to distribute load and ensure scalability.

Caching:

  • Use Redis to cache frequently accessed flight and pricing data to reduce database load and improve response times.

Single Points of Failure:

  • Ensure redundancy in the load balancer and message queue to prevent single points of failure.

Trade-offs:

  • Consistency vs. Availability: Opt for eventual consistency in NoSQL databases to ensure high availability and partition tolerance.
  • Push vs. Pull: Airlines push updates to the system, reducing the need for frequent polling and minimizing latency.
  • SQL vs. NoSQL: Use SQL for transactions requiring strong consistency and NoSQL for high-volume, real-time data.

This design balances the need for real-time updates with scalability and fault tolerance, ensuring that users receive accurate and timely flight information.

System designMediumExpedia

15. Explain how you would design a system to handle hotel bookings at scale.

The full question

Explain how you would design a system to handle hotel bookings at scale. What components would you consider?

Model answer

1. Requirements & scale

Functional Requirements:

  • Users can search for available hotels based on location, date, and other filters.
  • Users can view hotel details, including pricing and availability.
  • Users can make a booking for a hotel room.
  • Users can cancel or modify their bookings.
  • Support for user authentication and profile management.

Non-Functional Requirements:

  • High availability and reliability.
  • Low latency for search and booking operations.
  • Scalability to handle peak loads, such as during holiday seasons.
  • Consistency in booking data to avoid overbooking.

Estimates:

  • Assume 1 million daily active users, with peak times seeing 10,000 queries per second (QPS) for search.
  • Average booking size: 1 KB. Estimated 100,000 bookings per day.
  • Storage: 100,000 bookings/day * 1 KB = ~100 MB/day. For a year, ~36.5 GB.
  • Bandwidth: 10,000 QPS * 1 KB = ~10 MB/s during peak.

2. High-level architecture

flowchart TD
    subgraph Client
        A[User Devices]
    end

    subgraph Edge/CDN
        B[CDN]
    end

    subgraph Load Balancer
        C[Load Balancer]
    end

    subgraph API / Services
        D[Search Service]
        E[Booking Service]
        F[User Service]
    end

    subgraph Cache
        G[Redis Cache]
    end

    subgraph Datastores
        H["SQL DB (Bookings)"]
        I["NoSQL DB (Hotel Info)"]
    end

    subgraph Message Queue
        J[Booking Queue]
    end

    subgraph Workers
        K[Booking Processor]
    end

    A -->|Search Request| B
    B -->|Search Request| C
    C -->|Search Request| D
    D -->|Hotel Data| G
    D -->|Hotel Data| I

    A -->|Booking Request| B
    B -->|Booking Request| C
    C -->|Booking Request| E
    E -->|Booking Data| H
    E -->|Booking Data| J
    J -->|Process Booking| K
    K -->|Update Booking| H

    A -->|User Profile| B
    B -->|User Profile| C
    C -->|User Profile| F
    F -->|User Data| H
Diagram

3. API design

  • GET /hotels/search: Search for hotels based on filters like location and date.
  • GET /hotels/{hotelId}: Retrieve details of a specific hotel.
  • POST /bookings: Create a new booking.
  • PUT /bookings/{bookingId}: Modify an existing booking.
  • DELETE /bookings/{bookingId}: Cancel a booking.
  • POST /users/login: Authenticate a user.
  • GET /users/{userId}/profile: Retrieve user profile information.

4. Data model & storage

Datastores:

  • SQL Database (Bookings): Chosen for ACID properties to ensure consistency in bookings.
  • Tables: Bookings (id, user_id, hotel_id, room_type, check_in, check_out, status)
  • Partition Key: user_id for user-centric queries.
  • NoSQL Database (Hotel Info): Chosen for flexibility and scalability in handling diverse hotel data.
  • Collections: Hotels (hotel_id, name, location, rooms, amenities, pricing)
  • Redis Cache: Used to cache frequently accessed hotel data to reduce latency.

5. Deep dive

The core challenge in hotel booking systems is ensuring consistency and preventing overbooking. The system uses a message queue and worker pattern to handle bookings asynchronously, ensuring that bookings are processed in a controlled manner.

sequenceDiagram
    participant U as User
    participant B as Booking Service
    participant Q as Booking Queue
    participant W as Booking Processor
    participant DB as SQL DB

    U->>B: POST /bookings
    B->>Q: Enqueue booking request
    Q->>W: Dequeue booking request
    W->>DB: Check availability
    alt Availability exists
        W->>DB: Create booking
        W-->>U: Booking confirmed
    else No availability
        W-->>U: Booking failed
    end
Diagram

6. Scale, bottlenecks & trade-offs

Scalability:

  • Horizontal Scaling: Services and databases can be scaled horizontally to handle increased load.
  • Caching: Redis is used to cache hotel data, reducing load on the NoSQL database and improving response times.

Bottlenecks:

  • Database Write Load: High write load during peak booking times can be mitigated by using a message queue to process bookings asynchronously.
  • Search Latency: Use of caching and optimized indexing in the NoSQL database can help reduce search latency.

Trade-offs:

  • Consistency vs. Availability (CAP Theorem): The system prioritizes consistency over availability for booking operations to prevent overbooking.
  • Push vs. Pull: Booking updates are processed asynchronously (pull model) to ensure system stability under load.
  • SQL vs. NoSQL: SQL is used for bookings to ensure transactional integrity, while NoSQL is used for hotel data to allow for flexible schema and scalability.
System designMediumExpedia

16. How would you design a recommendation system for travel packages?

Model answer

1. Requirements & scale

Functional Requirements:

  • Provide personalized travel package recommendations to users.
  • Allow users to filter recommendations based on preferences (e.g., budget, location, duration).
  • Update recommendations in real-time as user preferences change.

Non-Functional Requirements:

  • High availability and low latency in serving recommendations.
  • Scalability to handle millions of users and travel packages.
  • Ensure data privacy and security for user data.

Estimates:

  • Assume 10 million active users, with each user generating 5 recommendation requests per day.
  • Total requests per day: 50 million.
  • Peak QPS (queries per second): ~600 (50 million / 86,400 seconds).
  • Storage: Assume each travel package requires 1 KB of metadata. With 1 million packages, storage needed is ~1 GB.
  • Bandwidth: Assuming 1 KB per recommendation response, peak bandwidth is ~600 KB/s.

2. High-level architecture

flowchart TD
    subgraph Client
        A[User Device]
    end

    subgraph Edge/CDN
        B[CDN]
    end

    subgraph Load Balancer
        C[Load Balancer]
    end

    subgraph API / Services
        D[Recommendation Service]
        E[User Profile Service]
    end

    subgraph Cache
        F[Redis Cache]
    end

    subgraph Datastores
        G[User Data (SQL)]
        H[Travel Packages (NoSQL)]
        I[Analytics Data (NoSQL)]
    end

    subgraph Message Queue
        J[Kafka]
    end

    subgraph Workers
        K[Batch Processing]
        L[Real-time Processing]
    end

    A -->|Request| B
    B -->|Request| C
    C -->|API Call| D
    D -->|Fetch Profile| E
    E -->|Profile Data| D
    D -->|Fetch Packages| F
    F -->|Cached Packages| D
    D -->|Fetch from DB| H
    H -->|Package Data| D
    D -->|Recommendation| C
    C -->|Response| B
    B -->|Response| A
    D -->|User Interaction| J
    J -->|Data Stream| L
    L -->|Update Cache| F
    L -->|Store Analytics| I
    K -->|Batch Updates| G
Diagram

3. API design

  • GET /recommendations?userId={id}&filters={filters}: Fetch personalized travel package recommendations for a user.
  • POST /user/preferences: Update user preferences for recommendation customization.
  • GET /travel-packages/{id}: Retrieve detailed information about a specific travel package.

4. Data model & storage

Datastores:

  • User Data (SQL): Store user profiles and preferences. SQL is chosen for ACID compliance and complex queries.
  • Travel Packages (NoSQL): Store travel package metadata. NoSQL is chosen for scalability and flexibility in handling diverse package attributes.
  • Analytics Data (NoSQL): Store user interaction data for real-time processing and analytics.

Key Tables:

  • User Table (SQL): user_id, name, preferences, history
  • Travel Package Collection (NoSQL): package_id, destination, price, duration, features
  • User Interaction Collection (NoSQL): interaction_id, user_id, package_id, timestamp

Partition/Sharding Key:

  • User Table: user_id
  • Travel Package Collection: package_id
  • User Interaction Collection: user_id

5. Deep dive

The core of the recommendation system is the algorithm that generates personalized suggestions. This can be achieved using collaborative filtering, content-based filtering, or a hybrid approach.

sequenceDiagram
    participant User
    participant RecService as Recommendation Service
    participant UserProfile as User Profile Service
    participant Cache as Redis Cache
    participant PackageDB as Travel Packages DB

    User->>RecService: Request Recommendations
    RecService->>UserProfile: Fetch User Profile
    UserProfile-->>RecService: User Preferences
    RecService->>Cache: Check Cached Recommendations
    Cache-->>RecService: Cached Data (if available)
    RecService->>PackageDB: Fetch Packages (if cache miss)
    PackageDB-->>RecService: Package Data
    RecService->>User: Return Recommendations
Diagram

The recommendation algorithm can be enhanced using machine learning models that analyze user behavior and preferences to predict the most relevant packages. Real-time processing of user interactions helps in updating recommendations dynamically.

6. Scale, bottlenecks & trade-offs

Scaling:

  • Horizontal Scaling: Distribute the load across multiple instances of the recommendation service and databases.
  • Caching: Use Redis to cache frequent queries, reducing database load and improving response time.

Bottlenecks:

  • Data Freshness vs Latency: Balancing real-time updates with low-latency responses. Frequent cache invalidation might increase latency.
  • Database Scaling: NoSQL databases can handle large volumes of travel packages efficiently, but require careful design to avoid hotspots.

Trade-offs:

  • Consistency vs Availability (CAP): Prioritize availability and partition tolerance, accepting eventual consistency in NoSQL databases.
  • Push vs Pull: Use a pull-based model for fetching recommendations, allowing users to request updates based on their interactions.
  • Sync vs Async: Asynchronous processing of user interactions ensures the system remains responsive while updating recommendations in the background.

By leveraging a hybrid recommendation approach and optimizing the architecture for scalability and low latency, the system can effectively serve personalized travel package recommendations to a large user base.

TechnicalEasyExpedia

17. What are the key differences between a stack and a queue?

The full question

What are the key differences between a stack and a queue? Can you provide a real-world example of where each might be used?

Model answer

Key Differences Between a Stack and a Queue

  1. Data Structure Type: - Stack: A stack is a linear data structure that follows the Last In First Out (LIFO) principle. This means the last element added to the stack will be the first one to be removed. - Queue: A queue is a linear data structure that follows the First In First Out (FIFO) principle. This means the first element added to the queue will be the first one to be removed.
  2. Operations: - Stack: - Push: Add an element to the top of the stack. - Pop: Remove the element from the top of the stack. - Peek/Top: Retrieve the element at the top of the stack without removing it. - Queue: - Enqueue: Add an element to the back of the queue. - Dequeue: Remove the element from the front of the queue. - Front: Retrieve the element at the front of the queue without removing it.
  3. Use Cases: - Stack: Used in scenarios where you need to reverse items or backtrack, such as: - Function Call Stack: Manages function calls in programming languages, allowing for tracking of active functions and local variables. - Undo Mechanism: In applications like text editors, where the last action needs to be undone first. - Queue: Used in scenarios where order needs to be preserved, such as: - Print Queue: Manages print jobs in the order they are received. - Task Scheduling: In operating systems, where tasks are processed in the order they arrive.
  4. Real-World Examples: - Stack Example: Browser history navigation, where the last visited page is the first to be returned to when navigating back. - Queue Example: Customer service systems, where the first customer to call is the first to be served.

Understanding these differences helps in choosing the appropriate data structure based on the requirements of the problem at hand. The choice between a stack and a queue can significantly impact the performance and behavior of the application.

TechnicalMediumExpedia

18. Explain the concept of microservices and their advantages.

Model answer

Microservices are an architectural style that structures an application as a collection of small, autonomous services, each running in its own process and communicating with lightweight mechanisms, often HTTP-based APIs. This approach contrasts with monolithic architectures, where all components are tightly integrated into a single application.

Advantages of Microservices

  1. Scalability - Each microservice can be scaled independently based on its specific demand, enabling more efficient resource utilization. For instance, a service handling user authentication can be scaled separately from a service managing data analytics.
  2. Resilience - Microservices enhance fault isolation. If one service fails, it does not necessarily bring down the entire system, unlike in monolithic architectures. This isolation allows for more robust applications.
  3. Technology Diversity - Teams can choose the best technology stack for each service, allowing for innovation and the use of the most suitable tools for specific tasks. For example, a service requiring high computational power might use a different language or framework than a simple CRUD service.
  4. Faster Time to Market - Development teams can work on different services simultaneously, reducing the time needed to develop and deploy new features. This parallel development is facilitated by the decoupled nature of microservices.
  5. Improved Fault Tolerance and Recovery - Using patterns like the Saga pattern (from R1), microservices can achieve eventual consistency and handle failures gracefully. If a transaction involving multiple services fails, compensating actions can be executed to maintain system integrity.
  6. Ease of Deployment - Continuous deployment and integration become more manageable as each microservice can be deployed independently. This independence reduces the risk associated with deploying new features or updates.
  7. Organizational Alignment - Microservices align well with agile development methodologies and DevOps practices. They allow small, cross-functional teams to own and manage individual services, fostering a culture of ownership and accountability.

Conclusion

Microservices offer significant advantages in terms of scalability, resilience, and flexibility. However, they also introduce complexities such as service orchestration, network latency, and the need for robust monitoring and logging systems. Despite these challenges, the benefits often outweigh the drawbacks, making microservices a popular choice for modern, large-scale applications.

TechnicalMediumExpediaEngineering Manager

19. What major production issue have you encountered, and how did you bring a new skill into the team?

Model answer

1. Frame the incident and your ownership

  • Choose a real incident with meaningful customer or business impact: for example, a booking or checkout failure during a traffic spike.
  • State the scope and evidence: affected requests or users, duration, error rate, and the teams or services involved. Separate what you knew at the time from what you learned afterward.
  • Explain your role as the manager: coordinating response, clarifying decision ownership, communicating impact, and protecting the team from distracting work.

2. Stabilize before diagnosing deeply

  • Establish an incident lead, a shared timeline, and a customer-impact update cadence.
  • Use dashboards and traces to isolate the failing dependency; mitigate first with a reversible action such as rate limiting, traffic shifting, or disabling a nonessential feature.
  • Track recovery with concrete signals: error rate, latency percentiles, queue depth, and successful transactions—not just whether the service is reachable.

3. Find the systemic cause

  • Describe the causal chain, not just the final symptom. For example: retries increased load on a slow payment dependency, which exhausted connection pools and caused booking timeouts.
  • Identify contributing conditions such as missing timeouts, weak alerting, untested load assumptions, or unclear ownership. Avoid framing the issue as an individual mistake.

4. Bring a new skill into the team

  • Make the skill specific to the gap revealed by the incident: distributed tracing, load testing, capacity modeling, or incident command.
  • I would pair an experienced practitioner with engineers who own the system, schedule hands-on exercises, and make the learning part of normal delivery—for example, add a load-test gate and review traces during service design.
  • Measure adoption and effectiveness: trained owners, coverage of critical paths, detection time, recovery time, and repeat-incident rate.

5. Close the loop

  • Share a blameless review with actions, owners, and deadlines; prioritize durable fixes against feature work based on customer risk.
  • A strong answer should show both immediate recovery and a lasting capability change. Interviewers listen for calm judgment, clear communication, measurable impact, and learning embedded in team practice.
flowchart TD
  A[Detect customer impact] --> B[Assign incident lead]
  B --> C[Mitigate and communicate]
  C --> D[Trace the causal chain]
  D --> E[Fix system weaknesses]
  E --> F[Teach and practice the missing skill]
  F --> G[Measure recurrence and recovery]
Diagram
TechnicalMediumExpedia

20. What is the difference between REST and GraphQL?

Model answer

Differences between REST and GraphQL

  1. Data Fetching: - REST: Utilizes fixed endpoints that return a set structure of data. Clients may receive more or less data than needed, leading to over-fetching or under-fetching. - GraphQL: Allows clients to specify exactly what data they need, reducing over-fetching and under-fetching by enabling more precise queries.
  2. API Structure: - REST: Organizes APIs around resources, with each endpoint corresponding to a specific resource. Typically follows a CRUD model with standard HTTP methods (GET, POST, PUT, DELETE). - GraphQL: Organizes APIs around a schema and types. Clients interact with a single endpoint to query or mutate data, providing flexibility in how data is requested and manipulated.
  3. Versioning: - REST: Often requires versioning of APIs as they evolve, leading to multiple versions of endpoints that need to be maintained. - GraphQL: Avoids versioning by allowing clients to request only the fields they need, making it easier to evolve the API without breaking existing clients.
  4. Response Format: - REST: Typically returns data in JSON format, but the structure is predefined by the server. - GraphQL: Returns data in JSON format, but the structure is defined by the client’s query, allowing for more tailored responses.
  5. Performance: - REST: Can result in multiple network requests to different endpoints to gather related data, which may impact performance. - GraphQL: Enables fetching of all required data in a single request, potentially improving performance by reducing the number of network calls.
  6. Error Handling: - REST: Error handling is typically done through HTTP status codes, with additional error information in the response body. - GraphQL: Uses a standardized error format in the response, separating data and errors, which can provide more detailed error information.
  7. Tooling and Ecosystem: - REST: Has a mature ecosystem with a wide range of tools and libraries for API development and testing. - GraphQL: Although newer, it has a rapidly growing ecosystem with tools like Apollo and Relay that facilitate client and server-side development.

In summary, REST and GraphQL offer different approaches to API design, each with its own strengths and trade-offs. REST is well-suited for simpler, resource-based APIs, while GraphQL provides flexibility and efficiency for complex data-fetching needs. The choice between them depends on the specific requirements and constraints of the application being developed.

Practice these out loud, don't memorise them

Reading an answer is not the same as being able to give one under pressure. ChannelPulse plays the interviewer, asks the follow-ups, and scores each answer with feedback and a model answer so you can hear the gap between what you said and what lands.

Get ChannelPulse Browse all questions