Bulb Switcher II – AlgoBox by dietpepsi
Given n
light bulbs, write two methods.
isOn(int i)
to determine if a light bulb is on.
toggle(start, end)
to toggle all the light bulbs in the range [start, end)
exclusive.
Read full article from Bulb Switcher II – AlgoBox by dietpepsi
No comments:
Post a Comment