Back to IVO questions
CodingSoftware Engineer

Enumerate Tic-Tac-Toe Games

Frequency: Reported


Enumerate every possible valid Tic-Tac-Toe game and print the count of completed games.

A depth-first search over board states and legal turn order was the confirmed approach.

Clarify before implementing:

  • whether equivalent move orders count separately;
  • whether play stops immediately after a win; and
  • whether symmetric boards count separately.