100 Prisoners

BrainteasersHard

Asked by: Jane Street

Description

100 prisoners in separate cells. A light bulb starts OFF. Each can toggle it. Find when all have visited.

Hints

Hint 1

Designate a counter.

Hint 2

What should the other 99 do?

Solution