Solution: Bulb Switcher
Solution: Bulb Switcher gives you n bulbs that start off and undergo n rounds: first all are toggled, then every second bulb, every third bulb, and so on. Return how many stay on.
We'll cover the following...
We'll cover the following...
Statement
You are given n bulbs, all initially turned off. You perform n rounds of toggling operations:
In round
...