Microsoft interview question

Tic Tac Toe question