Design Connect Four
Easy · Low-Level Design · about 35 minutes
Asked at Google, Microsoft, Amazon.
Design Connect Four: two players drop discs into a 7-column, 6-row board, and a disc falls to the lowest empty cell of its column. After each move, report whether that move won the game (four in a row horizontally, vertically or diagonally), drew it (board full), or play goes on.