Lights Out is a logic game wherein all lights need to be turned off to complete each board. See the first problem in the series for an introduction.

This problem contains boards that each require any number of moves to solve, ranging from 1 to 25 buttons (indices). The one function you write has to solve all of them. An answer is provided for some of the test cases, though there are often multiple possible answers per test case—any correct answer will work.

Prev.: 5x5, 13 moves — Next: 5x5, light-only solution? I

Solution Stats

138 Solutions

19 Solvers

Last Solution submitted on Nov 29, 2025

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...