NewProject Coding is here — build features and fix bugs in real codebases with an AI assistantSee what's new
avatar
chloechen1999Jul 19, 2026

Airbnb onsite coding round that felt like reading a novel

Interview Experiences
airbnb

Had my Airbnb onsite recently, 4 rounds total and still pending, wanted to write up one of the coding rounds since it stuck with me the most.

Got a scheduling style problem, you're given a date range someone wants covered and a list of listings, each with their own available windows inside that range. Interviewer wanted every way to cover the whole range with just one listing first, and we'd only move on to combos of two if nothing covered it end to end by itself. Took a couple passes just to get through the setup honestly, there was a lot to track before you even got to write anything.

Approach ended up being sort the listings by start date, then walk through with two pointers checking for a single one that spans everything. When that came up empty we paired windows together, made sure the combined coverage had no gaps and no overlap across the whole range. Greedy picking on the earliest valid end date got most of the trickier cases right without brute forcing every pair.

Follow up asked what changes if a listing can repeat itself across the split, which basically meant relaxing the two pointer walk to allow revisiting the same listing twice.

Didn't get to fully finish optimizing before time ran out but talked through the approach on the last part. No word back yet.

27174.3k

Replies (5)

avatar
arjunpatelJul 19, 2026

wait is this the split stay one? feels like it shows up in basically every onsite post here

123
avatar
chloechen1999Jul 19, 2026

yeah exactly that one, the two listing part is where it actually gets hard

132
avatar
benhe98Jul 19, 2026

the repeat listing follow up got me too, took a sec to realize you just allow revisiting

79
avatar
mchenJul 19, 2026

greedy on earliest end date is the move, wish I'd thought of that when I got a version of this

72
avatar
chloechen1999Jul 19, 2026

yeah once that clicked the rest came together pretty fast

44
avatar
User-amvf6Jul 20, 2026

good luck on the rest, hope you hear back soon

39
avatar
priyashah94Jul 19, 2026

how long was the whole loop from phone screen to this round?

35
No more replies