Given an M*N matrix of LEDs (ON/OFF), toggling an LED triggers a cascade: all adjacent (up, down, left, right) LEDs of the same state also toggle. Determine the final state after a specific toggle.
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.