HashedIn by Deloitte interview question

code for tic-tac-toe