Airbnb phone screen (Connect Four sim)
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.