Detect the Winning Move on an N x N Board
Asked at Airwallex · Coding Questions · Difficulty: Medium
Two players take turns placing their marks on a square `n x n` board, in the style of noughts and crosses. A player wins by owning every cell of one full row, one full column or one of the two main diagonals. Build a board object that records each move and says right away whether that move won the game for the player who made it.
Loading the problem…
More Airwallex interview questions
- Frontend System Design: Autocomplete Search Input
- Task Scheduler for Asynchronous Functions (Serial per Name)
- Two-Team Turn-Based Battle Simulator
- Toy Language Type System
- Grid Infection and Immunity Simulation
- Earliest Supporting Version with a Probe Budget