LeetCode 672: Bulb Switcher II
Problem Restatement There are n bulbs labeled from 1 to n . All bulbs are initially on. There are four buttons: Button Operation Button 1 Flip all bulbs Button 2 Flip bulbs with even labels Button 3 Flip bulbs with odd labels Button 4 Flip bulbs with labels 3k + 1 , such as 1, 4, 7, 10, ... We must press buttons exactly presses times. For each press, we...