Pergunta de entrevista da empresa Amount

How would you solve tic-tac-toe