← Amazon questions

LED matrix state toggle cascade

Filed under Amazon

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.

Related Amazon questions

Collected from public candidate posts and coding forums. Updated Nov 2026.