Booking Interview Question Review: A Budget-Based Combination Problem — How We Helped the Client Successfully Complete the Interview

This is a typical Booking technical interview question. The problem appears simple, but it actually tests algorithm design ability, edge case handling, and the capacity to clearly deliver structured logic and code under pressure.

Below, we reconstruct the entire interview process and explain how csOAhelp’s interview assistance service fully supported the client in completing a high-quality response.


📌 Problem Summary

Given:

  • Number of days to stay in each city
  • Guest’s total budget
  • A list of daily hotel prices per city

The goal is to identify all possible total trip costs that satisfy the budget requirement, and return them in ascending order.

The essence of this question is:

  • Enumerate all combinations of consecutive-day stays per city;
  • Calculate the total cost for each combination across all cities;
  • Return all valid total costs that do not exceed the guest’s budget.

📌 Booking Interview Question (English Version)

Problem Statement:

A guest is planning a trip to visit multiple cities.
For each city:

  • The guest must stay a fixed number of consecutive days (same number for each city).
  • Each day in a city has a different hotel price.

The guest has a total budget and wants to find out all possible total costs of visiting all cities exactly once (in any order), such that:

  • The total cost does not exceed the budget.
  • The stay in each city is for the required number of consecutive days.
  • The total trip consists of visiting every city exactly once, back-to-back (no returning or skipping).

Input:

  • numberOfDaysPerCity: Integer — number of consecutive days to stay in each city.
  • guestBudget: Integer — maximum total budget allowed.
  • dailyPricePerCity: Dictionary { cityName: List[int] } — each city's list of daily hotel prices.

Output:

  • A sorted list of all possible total trip costs (integers) that meet the criteria above.

🔍 Example:

numberOfDaysPerCity = 2
guestBudget = 309
dailyPricePerCity = {
"Paris": [10, 40, 5, 80, 10, 50],
"London": [60, 30, 20, 70, 50, 70],
"Amsterdam": [20, 80, 20, 50, 80, 100]
}

Explanation:

Total number of cities = 3
Total trip days = 3 cities × 2 days = 6 days
The guest must find all permutations of city orders, calculate the total cost for each full-trip sequence, and filter out those exceeding the budget.

Return:
A list of valid total costs, sorted in ascending order.


💡 What Did We Provide?

After seeing the interview question, we quickly produced the full answer and guidance, including:


✅ Solution Strategy

We first clarified the high-level plan:

  • Enumerate all possible city visit orders (using permutations)
  • For each order, accumulate hotel costs by the required number of days per city
  • Filter out total costs that exceed the budget
  • Deduplicate and sort the remaining valid totals

This logic was communicated to the client line by line for them to naturally present during the interview.


✅ Complete Solution Code

We provided a complete, runnable, well-structured Python implementation. It covered all logical details, including city order permutations, cost accumulation, budget filtering, and result sorting.

This block of code was written by us live during the interview and sent to the client in real time — not pre-prepared, not templated — entirely built dynamically based on the pace of the actual interview.


✅ Thought Process + Follow-up Answer Support

When the interviewer asked follow-up questions about time complexity, efficiency improvements, and potential pre-processing, we immediately organized and pushed the following response points:

  • Time complexity is O(n! * d), where n = number of cities, d = total days
  • Possible optimization: precompute continuous segment sums for each city to reduce nested loops
  • When the number of cities is small, the current approach remains the most readable and straightforward

The client answered based on our step-by-step guidance — no stalling, no logical gaps, and responses were complete and layered.


✅ Final Result

Throughout the interview, the client maintained fluent expression, structured reasoning, and correct code. The algorithm design was sound and the code was written successfully in one go. The interviewer gave positive feedback, and the interview ended smoothly.

The process was completely real-time, not pre-planned — the client responded live while we provided synchronous code writing and transmission in the background.


✅ What We Provide Is Not “Last-Minute Help” — It’s Real-Time Tactical Co-Support

csOAhelp’s interview assistance service is a real-time exam-mode collaboration:

💻 Live code writing and logic generation during the interview
✍️ Complete function implementation + Chinese comments + logical explanation
📎 Answer strategies and speaking notes for follow-up questions

In a high-pressure interview setting, we are your silent engineering team behind the scenes — ensuring you can answer clearly, with substance, without panic, and with confidence.


📩 If you have an upcoming interview and don’t want to take risks — contact us.
Whether it’s Booking, Amazon, Meta, or TikTok, we can provide real-time support during your interview to help you complete the question, explain your reasoning, and leave a solid impression.

One interview might decide whether you get to stay.
We’re here to help you write every line of code and stabilize every step of the process.

Leave a Reply

Your email address will not be published. Required fields are marked *