Two players, A and B, play Tic-Tac-Toe on a 3×3 grid. A goes first and places 'X', B places 'O'.
Given moves[i] = [r, c] (0-indexed) as the sequence of valid moves, return:
"A" if A wins,
"B" if B wins,
"Draw" if all 9 cells are filled with no winner,
"Pending" otherwise.
A player wins if any row, column, or diagonal has three of their marks.
Input: moves = [[0,0],[2,0],[1,1],[2,1],[2,2]]
Output: "A"
Input: moves = [[0,0],[1,1],[0,1],[0,2],[1,0],[2,0]]
Output: "B"
Input: moves = [[0,0],[1,1],[2,0],[1,0],[1,2],[2,1],[0,1],[0,2],[2,2]]
Output: "Draw"
Accepted:
Submission: