Pergunta de entrevista da empresa Panasonic

Was asked 3 bulb puzzle, 1 programming question and was asked to implement in C++.