LeetCode

Bulb Switcher

Click here for an explanation.