← Airbnb Interview Insights

Airbnb·Software Engineer·Onsite - System Design / Architecture·Senior

SeniorPrefer not to say
Apr 2026

Summary

Airbnb frontend-heavy system design round focused on building a lodging reservation widget from scratch. The scope was bigger than I expected and the edge case discussion at the end really caught me off balance.

Questions Asked (2)

Q1

Design a lodging reservation widget that includes check-in and check-out date inputs, dynamic pricing based on number of adults and children, guest count validation against room capacity, a disabled 'Book Now' button for sold-out or invalid states, and a confirmation dialog on submit. Walk through your component state, data models, and error states.

System DesignData ModelingTechnical Trade-offs
Author's notes

I started with state shape and that was probably the right call.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints, then outline the component's state and data models before diving into validation and error handling. Structure your answer around the user flow: date selection, guest count, pricing, validation, and submission. Emphasize trade-offs and edge cases to demonstrate depth.

Pro tip: Treat the widget as a state machine with distinct states (e.g., loading, valid, invalid, sold-out) and discuss how you'd handle asynchronous price updates and race conditions. This shows you think about real-world complexity beyond the happy path.

1. Clarify Requirements and Constraints

Ask questions to understand scope: Are prices fetched from an API? What are the room capacity rules? How should sold-out dates be determined? This ensures you address the right problems.

2. Define Component State and Data Models

Outline the state variables (dates, guest counts, price, validation errors, loading states) and the data models for room, reservation, and pricing. Consider using a single state object or multiple useState hooks.

3. Design Validation and Error Handling

Describe validation rules for dates (check-out after check-in), guest count (adults + children <= capacity), and sold-out status. Explain how errors are surfaced to the user and how they affect the Book Now button.

4. Handle Dynamic Pricing and Asynchronous Updates

Explain how pricing is calculated based on dates and guest counts, and how you'd fetch updated prices (e.g., debouncing, loading indicators, handling stale responses).

5. Implement Submission and Confirmation

Describe the submit flow: disabling the button when invalid, showing a confirmation dialog, and handling the reservation API call with success/error states.

Key Points to Mention

  • State management: useReducer vs useState for complex state, and derived state for validation and pricing.
  • Data models: Room (capacity, base price), Reservation (dates, guests, total price), PricingBreakdown (nightly rates, fees, discounts).
  • Validation: check-out after check-in, guest count <= capacity, dates not in the past, and sold-out dates.
  • Error states: inline validation messages, disabling Book Now, and handling API errors gracefully.
  • Dynamic pricing: debouncing API calls, caching, and handling race conditions with request cancellation.
  • Accessibility: ensuring date inputs and error messages are accessible (ARIA labels, focus management).

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

Q2

How would you test edge cases like minimum night requirements, partial availability windows, timezone and daylight saving time transitions, and price rounding in this widget?

System DesignTechnical Trade-offsAlgorithms & Data Structures
Author's notes

This is where I started rambling.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Structure your answer by first clarifying the widget's requirements and constraints, then systematically address each edge case category (minimum nights, partial availability, timezone/DST, price rounding) with specific testing strategies. Emphasize a combination of unit tests, integration tests, and property-based testing to cover boundary conditions and real-world scenarios.

Pro tip: Demonstrate maturity by discussing how you would prioritize edge cases based on business impact and likelihood, and mention the importance of logging and monitoring in production to catch unforeseen edge cases.

1. Clarify requirements and assumptions

Ask questions to understand the widget's exact behavior, such as how minimum night requirements interact with partial availability and how timezones are handled. Confirm assumptions about price rounding rules and DST handling.

2. Identify edge cases for each category

For minimum nights, consider boundaries like exactly meeting the requirement, one night short, and zero nights. For partial availability, test windows that start/end mid-day, overlap with minimum stays, and have gaps. For timezones/DST, test transitions like spring forward and fall back, and cross-timezone bookings. For price rounding, test rounding at .5, currency-specific rules, and cumulative rounding errors.

3. Design test strategies

Use unit tests for isolated logic (e.g., price rounding), integration tests for interactions (e.g., availability with timezones), and property-based tests to generate random valid/invalid inputs. Consider mocking time for DST tests and using fixed dates.

4. Prioritize and automate

Prioritize edge cases based on business impact (e.g., DST causing off-by-one errors) and automate regression tests. Include monitoring in production to detect edge case failures.

5. Validate and iterate

Run tests, analyze failures, and refine both the widget and tests. Consider edge cases that might emerge from user behavior and update tests accordingly.

Key Points to Mention

  • Boundary value analysis for minimum night requirements (e.g., exactly N nights, N-1, N+1).
  • Handling partial availability windows: ensure bookings can't span unavailable periods and respect minimum stays.
  • Timezone and DST testing: use UTC internally, test transitions, and consider user's local timezone.
  • Price rounding: use decimal arithmetic, define rounding rules (half-up, half-even), and test cumulative effects.
  • Property-based testing to cover a wide range of inputs and catch unexpected edge cases.
  • Importance of logging and monitoring to catch edge cases in production.

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