Reported interview periodDec 2025–Sep 2026
Generalized Tic-Tac-Toe
Implement a two-player game on a rows x cols board. A player wins by placing k consecutive marks horizontally, vertically, or along either diagonal.
Practice focusRequirements - Player 1 moves first and players alternate. - move places the current player's mark and returns that player number if the move completes a run of length k ; otherwise return 0 . - After a win, later calls return the existing winner without changing it. - Initially assume coordinates are valid and empty; explain how production code would reject invalid moves. - Support rectangular boards and k smaller than either dimension. - Avoid scanning the entire board after every move.…