# loz haller

## About Me

https://codeforphilly.org/people/PainManagement) There are 100 prisoners in 100 different prisons. There is a bulb in each prison which is controlled by a switch outside that prison. Initially bulbs in the all the prisons are glowing. Would toggle in first iteration only. Hence, we see that out of first ten prisons, only prison 1, 4 and 9 would have bulb switched off after 100 iterations. This gives hint that squares of a number are the ones with off multiples and hence we can extend this logic. Which bulb will glow brighter and why? The bulbs are in series so the amount of current flowing through each is same. One door leads to heaven and the other door leads to hell. One guard always tells the truth and the other guard always lie, but you don’t know which one is honest and which one is liar. Given that you can only ask one question from one of them, what would your question be in order to find the way to heaven? ’ If I ask the other Guard about which door leads to heaven, what would he tell me? The door that the Guard specifies will lead to hell. Other door would lead to heaven. This is due to the fact that if you end up asking this question from the Guard who always tells the truth, he would point you to the door that