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

Airbnb phone screen (Connect Four sim)

Interview Experiences
airbnb

Had my Airbnb screening call this week. Whole 45 minutes was one question: build out Connect Four, 6 columns by 7 rows, discs drop to the lowest open slot in whichever column you pick.

Board state and turns were the easy part. The actual work was win detection. Every time a disc lands you scan out from that spot in all directions, horizontal, vertical, both diagonals, counting same colored discs to see if you hit four in a row. Went with brute force scanning instead of keeping a running count structure, kept space down by not copying the board each move.

Also had to track whether the game's still live, tied out because the board's full, or somebody already won, and print the board so it reads like an actual grid when you're staring at it mid debug.

Interviewer called it mostly simulation with some two pointer style scanning for the diagonal checks. Didn't get to a follow up, ran low on time before we could extend it to different board sizes.

No update yet, tbh not expecting much either way. Recruiter said 3 to 5 business days for next steps.

16772.7k

Replies (4)

avatar
ananyakumarJul 22, 2026

the diagonal check part is always where people trip up on these grid games honestly

66
avatar
nathanyoonJul 23, 2026

yeah that's exactly where I spent most of my 45, everything else went fast

41
avatar
sophiedavis895Jul 22, 2026

good luck on the rest, hope you hear back soon

51
avatar
User-fursfJul 22, 2026

did they give you starter code for the board setup or did you build the whole thing from scratch?

44
avatar
nathanyoonJul 22, 2026

built it from scratch, they gave me the function signature and an empty grid, that's about it

80
avatar
User-7xpckJul 22, 2026

friend of mine got a different simulation heavy question there recently too, feels like that's their new phone screen flavor

22
avatar
User-xj7wsJul 22, 2026

yeah heard something similar, guess it's a phase they're going through

94
No more replies