Phenom Interview Question

Gfg puzzles. Light and switch puzzle.