Encapsulate a request as an object so it can be queued, logged, or undone — instead of calling light.turnOn() directly, you execute a LightOnCommand.
Implement `LightOnCommand`/`LightOffCommand` (execute()/undo()) and the solve history stack that supports 'undo'.
solve(ops) runs a sequence of 'on' | 'off' | 'undo' against a Light, pushing every executed command onto a history stack that 'undo' pops and reverses, and returns { isOn, historyLength }.
Sample tests