New
The Learning module is now live
See what's new
×
Question Bank
Learning
NEW
Pricing
Blog
Forum
HOT
JobRadar
Description
Solution
Discussion
Submissions
Ask AI
Question Bank
Hudson River Trading
Coding Question
AI Insights
Quick Summary
Simulate placing a piece on an n x n Reversi board at a specified coordinate.
Identify and flip opponent pieces in all 8 directions if they form a valid bounded sequence.
Return the updated board or the original if the move is invalid or flips no pieces.
What This Tests
Grid traversal and boundary validation
Multi-directional scanning logic
State mutation and conditional flipping
Index arithmetic for diagonal movement
Common Patterns
DFS/BFS
Graph Traversal
Collapse
Hint 1
Hint 2
What Interviewers May Ask Next
Accepted
613
/1.6k
Acceptance Rate
38.3%
Ask AI Assistant
Ask AI Assistant
Ask me anything about this coding question!
Qwen
Qwen3.7-Flash
0/2000
Auto
Debug
Run
Submit
Test Cases
Input
board =
row =
col =
player =
Output
Expected