InterviewDB
Question
Throw Balls: Simulate Ball Throws Between Players and Determine Who Holds the Ball After N Rounds
phone
Question Details
Problem There are n players standing in a circle (0-indexed). Player 0 starts with the ball. Each round, the current holder throws the ball to the player k positions ahead (wrapping around). After m rounds, who has the ball? Example: Approach Direct…
Full Details
🔒
Unlock full leaked content
Full insider details, leaked discussions, and candidate experiences.
Get Premium →Topics
Coding
Phone