← Questions

Generalized tic-tac-toe with k in a row

0
DatabricksHebbiaCodingLast asked Oct 2026

A coding interview question asked in Databricks's algorithms (two rounds) round and at Hebbia, last asked Oct 2026. It tests design, matrix and simulation.

Design a two-player Tic-Tac-Toe game on a board with n rows and m columns. A player wins by placing k of their own marks consecutively in one line: horizontal, vertical, diagonal, or anti-diagonal.

Sign in to unlock this question

The full prompt, the worked answer and your own canvas or code with the AI tutor. New accounts get 5 credits: each one unlocks a question for good.

Where it's asked

  • Databricks · Algorithms (two rounds) · Last asked Oct 202660 min · Live coding in CoderPad or similar
  • Hebbia · Onsite build day · Last asked Jun 2026480 min · About eight hours in the New York office building and deploying an app from scratch from a set of requirements, then a demo to the team

What it tests

design · matrix · simulation

Your code and the AI tutor open when you unlock this question.