Airbnb

Airbnb Software Engineer Onsite Coding Questions

17+ questions from real Airbnb Software Engineer Onsite Coding rounds, reported by candidates who interviewed there.

17
Questions
8
Topic Areas
10+
Sources

What does the Airbnb Onsite Coding round test?

The Airbnb onsite coding round is the core technical evaluation. Software Engineer candidates typically see 2-3 algorithm and data structure problems. Problems range from medium to hard difficulty, and interviewers evaluate both correctness and code quality.

Top Topics in This Round

Airbnb Software Engineer Onsite Coding Questions

I used to read a lot of job search posts when I was struggling, so sharing mine after finally signing an offer (One offer from my dream company Airbnb, one from Doordash, and a few from other smaller

Airbnb onsite

Algorithms 2025

Totally bombed this question. Feeling embarassed. Anyone know the solution to this ? given a list of menu items, how would you pick the most cost optimal option - [8.0...

Airbnb onsite [Reject]

System Design 2019

Great experience despite outcome. They showed me around and had a room for me, with my name handwritten on a whiteboard and a schedule printed out. - Two coding rounds - a) Find...

Given below 3x3 matrix, solve it. 1|2|3 -+-+- 4|5|6 -+-+- |8|7 Appreciate if you could provide code for DFS or BFS https://leetcode.com/problems/sliding-puzzle

LeetCode #1235: Maximum Profit in Job Scheduling. Difficulty: Hard. Topics: Array, Binary Search, Dynamic Programming, Sorting. Asked at Airbnb in the last 6 months.

LeetCode #631: Design Excel Sum Formula. Difficulty: Hard. Topics: Array, Hash Table, String, Graph Theory, Design, Topological Sort, Matrix. Asked at Airbnb in the last 6 months.

#638 Shopping Offers

Dynamic Programming

LeetCode #638: Shopping Offers. Difficulty: Medium. Topics: Array, Dynamic Programming, Backtracking, Bit Manipulation, Memoization, Bitmask. Asked at Airbnb in the last 6 months.

LeetCode #1298: Maximum Candies You Can Get from Boxes. Difficulty: Hard. Topics: Array, Breadth-First Search, Graph Theory. Asked at Airbnb in the last 6 months.

LeetCode #721: Accounts Merge. Difficulty: Medium. Topics: Array, Hash Table, String, Depth-First Search, Breadth-First Search, Union-Find, Sorting. Asked at Airbnb in the last 6 months.

LeetCode #3076: Shortest Uncommon Substring in an Array. Difficulty: Medium. Topics: Array, Hash Table, String, Trie. Asked at Airbnb in the last 6 months.

LeetCode #1257: Smallest Common Region. Difficulty: Medium. Topics: Array, Hash Table, String, Tree, Depth-First Search, Breadth-First Search. Asked at Airbnb in the last 6 months.

LeetCode #1928: Minimum Cost to Reach Destination in Time. Difficulty: Hard. Topics: Array, Dynamic Programming, Graph Theory. Asked at Airbnb in the last 6 months.

You are a thief standing in a room. The room has length L and width W. Your goal is to go from the bottom wall to anywhere on the top...

We are given a 2D maze that\'s composed of rooms. We can move from one room to another neighbouring room in all four directions (L,U,R,D). The starting position in the...

I\'m sure everyone remembers the classic Trapping Rain Water (https://leetcode.com/problems/trapping-rain-water/) Well here is an interesting twist. Let\'s say you have been given a set of heights representing the heights of buildings....

## Problem You have a 1D array representing a surface. Water droplets fall at positions given in a list. When two droplets are adjacent (no gap between them), they merge into one larger droplet. After all droplets have fallen, return the number of distinct water bodies and the size of the largest one. ```python def simulate_droplets(surface_len: int, drops: list[int]) -> tuple[int, int]: # returns (num_distinct_bodies, largest_body_size) pass ``` **Example:** ``` Input: surface_len = 10, drops = [3, 4, 7, 8, 9] After all drops: Positions filled: {3,4,7,8,9} Body 1: [3,4] -> size 2 Body 2: [7,8,9] -> size 3 Output: (2, 3) ``` ## Follow-ups 1. How would you track which droplets merged and when (event log)? 2. If drops are applied one at a time and you must answer queries after each drop, what data structure handles this efficiently? 3. Extend to 2D: droplets fall on a grid and merge if they touch horizontally or vertically. 4. What is the time complexity of your approach using a Union-Find structure?

## Problem A customer is owed a total refund of `R` dollars across multiple orders. Each order has an `order_id` and `amount_paid`. Distribute the refund proportionally (each order gets `amount_paid / total_paid * R`), rounded down to the nearest cent. Apply any rounding remainder to the order with the largest fractional part. Return a list of `{order_id, refund_amount}` dicts. ```python def allocate_refund(orders: list[dict], R: float) -> list[dict]: # orders: [{"order_id": str, "amount_paid": float}] pass ``` **Example:** ``` orders = [{order_id:"A", amount_paid:100}, {order_id:"B", amount_paid:150}, {order_id:"C", amount_paid:250}] R = 10.00 Proportions: A=2.00, B=3.00, C=5.00 -> exact, no rounding needed. Output: [{"order_id":"A","refund_amount":2.00}, ...] If R = 10.01: A gets 2.002 -> $2.00, B gets 3.003 -> $3.00, C gets 5.005 -> $5.00, remainder $0.01 -> C (largest fraction) ``` ## Follow-ups 1. Why should you use integer arithmetic (cents) instead of floats for financial calculations? 2. What if two orders have identical fractional parts — how do you break the tie deterministically? 3. How would you handle partial refunds where a single order's refund cannot exceed what was paid? 4. How would you write an audit log proving the allocation was fair?

See All 17 Questions from This Round

Full question text, answer context, and frequency data for subscribers.

Get Access