Google Interview Question

design algorithm for tic-tac-toe