Free written solution

Find Winner on a Tic Tac Toe Game (LeetCode 1275): Solution and Explanation

Replay a list of tic-tac-toe moves where A moves first, and report "A" or "B" for the winner, "Draw" for a full board with no winner, or "Pending" if the game is not finished.

Read the intuition, approach, code and complexity →