Google Interview Question

Two LC Medium questions. Tic Tac Toe and String.