InterviewDB
Question
Turn-based Game - Simulate Game State and Determine Valid Moves
phone
Question Details
Problem Implement a turn-based game engine for a simplified strategy game on an n x n grid. Two players alternate turns. Each turn, a player moves one of their pieces to an adjacent cell (up/down/left/right). A piece captures an opponent piece by moving onto its cell. The game ends when one player has no pieces left. Implement: move(player, from_pos, to_pos) - execute a move or raise if invalid. valid_moves(player) -> List[Tuple] - all legal moves for the player. is_game_over() -> bool winner()…
Full Details
🔒
Unlock all Two Sigma questions
Full insider details, leaked discussions, and candidate experiences.
Get full access — $100 a year, unlimited accessAbout This Question
This is a reported interview question from a two sigma interview during the phone round.
It covers the following topics: Coding, Phone, Onsite, Matrix .
More Two Sigma Interview Questions
1p3a
Two Sigma Quant Research Intern Onsite Interview Experience and Insights
1p3a
Two Sigma Quant Finance Intern Tech Phone Screen Interview Experience
1p3a
Twosigma QSE/SWE Interview Process for General Hiring
LeetCode
Two Sigma | Quantitative Software Engineer | Apr 2020 [Reject]
LeetCode
#43 Multiply Strings