Search
⌘K

Leetcode 348. Design Tic-Tac-Toe

Implement a Tic-Tac-Toe class for an n×n board that supports making moves and immediately reports whether a player wins; the key challenge is designing state (e.g., per-row, per-column and diagonal counters) to detect a win in O(1) time per move without scanning the whole board.

Asked at:

Databricks

Meta


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Mid April, 2026

Databricks

Senior

nxm board, configurable k win condition

Mid March, 2026

Databricks

Senior

Early March, 2026

Databricks

Mid-level

I was asked to handle n*n tictactoe board

Your account is free and you can post anonymously if you choose.