Light More Light, UVa — 10110

Abrar Shariar
Console.log()
Published in
2 min readMar 31, 2020

Try it yourself on UVa. It’s Fun!

This problem has also been part of the programming challenges on the Algorithm Design Manual’s chapter 2.

The Premise

The premise of the problem can be chalked out like this way:

  • A guy goes along corridor N times which have N bulbs
  • Every time he goes along the corridor he toggles the switch of certain bulbs based on certain condition
  • We have to determine the state of the last bulb i.e. Nth bulb.

Abrar Shariar
Console.log()

Techie | Engineer | Coder