LeetCode
Design Tic-Tac-Toe
Click
here
for an explanation.