348. Design Tic-Tac-Toe

Medium
Array
Hash Table
Design
Matrix
Simulation

Description

Hints

Hint 1
Could you trade extra space such that <code>move()</code> operation can be done in O(1)?
Hint 2
You need two arrays: int rows[n], int cols[n], plus two variables: diagonal, anti_diagonal.

Statistics

Acceptance
58.7%
Submissions
539,733
Accepted
317,077