3842. Toggle Light Bulbs
You are given an array bulbs of integers between 1 and 100. There are 100 light bulbs numbered from 1 to 100. All of them are switched off initially. For each element bulbs[i] in the array bulbs: - If the bulbs[i]th light bulb is currently off, switch it on. - Otherwise, switch it off. Return the list of integers denoting the light bulbs that are on in the end, sorted in ascending order. If n
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start