Noughts and crosses (also known as tic-tac-toe) is a paper-and-pencil game for two players, O and X, who take turns marking the spaces in a 3×3 grid.

The picture shows a typical final position or outcome of the game where O started the game and has won. It is straightforward (but a bit boring) to work out all the other possible outcomes of a game. In counting the number of final positions let us focus only on "distinct" positions -- in other words, we avoid double-counting where "new" solutions are found just by turning the grid diagram around, switching the "O" and "X" symbols, and so on. Once these duplicates are ignored there are only 138 final positions. If we suppose that O makes the first move, then these possible outcomes can be broken down as follows:

91 distinct positions where O wins

44 distinct positions where X wins

3 distinct positions that are drawn

More Info: en.m.wikipedia.org