FIS interview question

Tic-tak-toe problem