Amazon Interview Question

question implementing tic tac toe problem