Quick Overview

Count every legal Tic-Tac-Toe move sequence that completes a game from a reachable board and specified next player. Treat different move orders as distinct, stop immediately at the first win, and handle already terminal positions and draws correctly.

Count Complete Tic-Tac-Toe Game Sequences

Company: Decagon

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: medium

Interview Round: Technical Screen

Overview: Count every legal Tic-Tac-Toe move sequence that completes a game from a reachable board and specified next player. Treat different move orders as distinct, stop immediately at the first win, and handle already terminal positions and draws correctly.

Read the full Decagon Software Engineer interview experience this question came from

Loading…