Panasonic Interview Question

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