Search
⌘K

Leetcode 794. Valid Tic-Tac-Toe State

Determine if a 3x3 Tic-Tac-Toe board is reachable under normal play by checking counts of X and O and detecting winning lines, ensuring any win(s) are consistent with turn order (X goes first) and that no moves occur after the game should have ended.

Asked at:

Microsoft

Microsoft


Question Timeline

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

Mid September, 2025

Microsoft

Microsoft

Mid-level

Separate the logic to validate a win state into its own helper function. Makes it cleaner.

Comments

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