Boxes, Keys & Candies (OOD)
Asked at Airbnb · Coding Questions · Difficulty: Medium · Last asked Jun 2, 2026
You are given a set of numbered boxes. Each box may be open or locked, holds some candies, and may contain keys to other boxes and other boxes inside it. Starting from a given set of boxes, open as many boxes as you can and collect as many candies as possible.
Loading the problem…
More Airbnb interview questions
- Home Page — Search + Availability + Ranking
- Split Stay: Two-Listing Date Coverage
- Airbnb Experiences — Search Ranking (ML Design)
- Query System — Time + Geo Filtered User Activity
- Airbnb Booking System Design
- Improve Booking via Cover Photo Selection (ML Design)