← Questions

Tic-tac-toe with K players

0
GoogleCodingLast asked Jul 2026

Implement tic-tac-toe for k players on an n x n board. Players take turns placing their marks. However large the board is, a player wins as soon as they have three of their marks in a row, horizontally, vertically or diagonally.

Talk the design through before you code, and give the time each move takes.

Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding