Implement a Nested Tic-Tac-Toe Game Engine

Asked at Google · Coding Questions · Difficulty: Medium · Last asked Dec 4, 2025

Nested tic-tac-toe (often called ultimate tic-tac-toe) is played on a 3 x 3 grid of small tic-tac-toe boards, 81 cells in all. Winning a small board claims that square of the big grid, and three claimed squares in a row win the game. The twist is that each move decides which small board the opponent must play in next. Build the engine that checks moves, applies them, and reports wins and draws.

Loading the problem…