Algorithm · Databricks · Medium
Generalized Tic-Tac-Toe: Move Replay You are given an empty rectangular board with rows rows and cols columns. Coordinates are zero‑indexed: row indices run from 0 through rows - 1, and column indices run from 0 through cols - 1. A move attempt is a triple (row, col, player), where player is meant to be either 1 or 2. Process the attempt list moves in the order given. For each attempt, append one of the following numbers to the output list: 0 — the mark was placed legally,…
Checking your access…