Halloween SalePremium questions, over 30% offUnlock all premium questions for over 30% off
Color Chain Winner
Medium
FREE
You are implementing a color chain game. Two players take turns placing tokens on a grid. Each cell contains "red", "blue", or "" (empty). A player wins when they form a chain of 4 or more consecutive tokens of their color in a row, column, or diagonal.
Given the current board state (before the move), the position [row, col] where the current player places their token, and the player's color, place the token and check if the placement creates a chain of 4 or more. Return the winning player's color if they win, or "" if no win occurs.
...
Asked at:Snowflake
More Snowflake interview questions
- Maximum Profit Query Choiceeasy
- Guess Number with Feedback Delaymedium
- Limit Tree Height with Deletionsmedium
- Grep Command With Context Linesmedium
- All Subsetsmedium
- [OA] Bounded Transition Subsequencehard
- Inherited Access Rightshard
- Longest Prefix Routermedium
OfferRetriever
Master technical interviews with real questions from top companies. Build your confidence and career.
LEGAL
© 2026 Purple Business Holdings LLC. All rights reserved. See Terms of Service.