PracHub
QuestionsPremiumLearningGuidesInterview PrepNEWCoaches
|Home/System Design/Airbnb

Design Split Stay combinations API

Last updated: Apr 29, 2026

Quick Overview

This question evaluates API design, availability modeling, algorithmic pairing logic, and scalability considerations, and falls under the System Design category.

  • medium
  • Airbnb
  • System Design
  • Software Engineer

Design Split Stay combinations API

Company: Airbnb

Role: Software Engineer

Category: System Design

Difficulty: medium

Interview Round: Technical Screen

##### Question Design and implement an API endpoint that, given a list of Airbnb listings with available days and a requested date range, returns every pair of listings (Split Stay) whose combined availability covers the full range.

Quick Answer: This question evaluates API design, availability modeling, algorithmic pairing logic, and scalability considerations, and falls under the System Design category.

Related Interview Questions

  • Design a Scalable Job Scheduler - Airbnb
  • Design a Rental Marketplace Backend - Airbnb (hard)
  • Design a booking system - Airbnb (medium)
  • Design a group chat system - Airbnb (medium)
  • Design a real-time chat system with hot groups - Airbnb (hard)
Airbnb logo
Airbnb
Aug 4, 2025, 10:55 AM
Software Engineer
Technical Screen
System Design
11
0

Split-Stay Pair Finder API

Context

You are designing part of Airbnb's "Split Stay" search feature. A guest requests a date range (check-in to check-out). You are given a set of candidate listings and their per-day availability. A split stay allows the guest to stay in at most two listings during the trip.

Task

Design and implement an API endpoint that, given:

  • a requested date range [check_in, check_out), and
  • a set of candidate listings with their available nights in that range,

returns every pair of listings whose combined availability can cover the full stay. Assume nights are the days from check_in (inclusive) to check_out (exclusive).

Requirements

  1. API design
  • Define method, path, request, and response schema.
  • Dates must be ISO-8601, time zone-aware (assume UTC for simplicity).
  1. Matching semantics
  • Default: one-switch feasibility (guest moves at most once). That is, there exists a split point k such that the first k nights are available in listing A and the remaining nights are available in listing B.
  • Optional: union coverage mode (feature flag) where the union of A and B availability covers all requested nights (may require multiple moves; mainly for diagnostics/testing).
  1. Functional behavior
  • Do not pair a listing with itself.
  • Deduplicate symmetric pairs (A,B) and (B,A); return a canonical ordering but include a recommended split plan.
  • Include at least one valid split plan (dates/nights on each listing) for one-switch mode.
  1. Performance and constraints (make reasonable assumptions)
  • Number of candidate listings M up to 5,000 per request.
  • Stay length N up to 30 nights.
  • Return results with pagination/limits.
  1. Edge cases
  • No qualifying pairs → return empty list with 200.
  • Single listing fully covering the range is not considered (this endpoint focuses on pairs), but you may return a hint if desired.
  • Handle partial/blocked days by modeling availability at the night granularity.
  1. Provide a brief explanation of your algorithm, complexity, and any data structures used.

Solution

Show

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More System Design•More Airbnb•More Software Engineer•Airbnb Software Engineer•Airbnb System Design•Software Engineer System Design
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.