HashedIn by Deloitte Interview Question

Write the function for tic tac toe game.