Google interview question

Two LC Medium questions. Tic Tac Toe and String.