Flipping Balls with Moving Marked Positions

Problem: Flipping Balls with Moving Marked Positions

There are n balls arranged in a circle, indexed from 0 to n - 1. Initially, all balls are white, represented by w.

You are given a lis...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: