Sponsored
Use these hints if you're stuck. Try solving on your own first.
Simulate the whole game until a player receives the ball for the second time.
Solve with full IDE support and test cases