Puzzle - 100 Doors
Problem Statement - There are 100 doors in a row, all doors are initially closed. A person walks through all doors multiple times and toggle (if open then close, if close then open) them in the following way: In the first walk, the person toggles every door In the second walk, the person toggles every second door, i.e., 2 nd , 4 th , 6 th , 8 th , … In the third walk, the person toggles every third door, i.e. 3 rd , 6 th , 9 th , … Likewise, In the 100 th walk, the person toggles the 100 th door. Which doors are open in the end? Solution - Approach - We'll try to solve this question mathematically First we understand that each door state will be changed, depending on its number of factors and to be closed at the end the number of factors of that particular number should be odd. For eg:- Door 1 will be open at end as its only factor is 1 (odd), Door 2 will be closed as it has factors 1&2 (even). Now, let us consider a numb...