There are n bulbs in a circle, each bulb has one switch associated with it, on operating the switch, it toggles the state of the corresponding bulb as well as two bulbs adjacent to that one. Given all bulbs are in off state initially, give a plan to turn all bulbs on finally.
Note: n >= 1.
[Read more…]