Product
Pricing
Blog
Forum
NEW
Referral
Description
Solution
Discussion
Submissions
Ask AI
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
Report
Report seen similar question in interview
Accepted
499
/1k
Acceptance Rate
48.6%
Ask AI Assistant
Ask AI Assistant
Ask me anything about this coding question!
Python3
Auto
Debug
Run
Submit
Test Cases
Input
board =
row =
col =
player =
Output
Expected