100 doors in a row Interview puzzle
You have 100 doors in a row that are all initially closed. You make 100
passes by the doors starting with the first door every time. the first time through
you visit every door and toggle the door (if the door is closed, you open it, if its
open, you close it). the second time you only visit every 2nd door (door #2, #4,
#6). the third time, every 3rd door (door #3, #6, #9), etc, until you only visit the
100th door.
Question: what state are the doors in after the last pass? which are open which
are closed?
You can figure out that for any given door, say door #42, you will visit it
for every divisor it has. so 42 has 1 & 42, 2 & 21, 3 & 14, 6 &7. so on pass 1 i will
open the door, pass 2 i will close it, pass 3 open, pass 6 close, pass 7 open,
pass 14 close, pass 21 open, pass 42 close. for every pair of divisors the door
will just end up back in its initial state. so you might think that every door will end
up closed? well what about door #9. 9 has the divisors 1 & 9, 3& 3. but 3 is
repeated because 9 is a perfect square, so you will only visit door #9, on pass 1,
3, and 9… leaving it open at the end. only perfect square doors will be open at
the end.
Your Answer
More puzzles to try-
Physics of gears puzzle
In the picture shown below, There are four gears with the following specification:- Gear A has 60 teeth Gear B ...Read More »Floors Puzzle
We live in a large tower block, 10 floors high. My 5 year old son goes to school each day ...Read More »What way of death Bill McFarland must choose ?
Bill McFarland world’s most popular thief was caught stealing.Because of his popularity,The judge give him a strange punishment.He order him ...Read More »Create Number
Create a four digit number in which the first digit is one fourth of the last digit, Second digit is ...Read More »Which Travels Faster
Which Travels Faster? Solve below famous picture riddle:Read More »Who is killer Riddle
There was a very rich family, they lived in a big circular house. They had a maid, a butler, and ...Read More »Funny Girl Puzzle
In the below-given picture of a pretty girl, there is something wrong. Can you find out what it is?Read More »James Bond Archer
James Bond is caught up in a mysterious scenario where the evil villain has him blindfolded. He somehow breaks through ...Read More »Choose Men
A man is on a game show. He is presented with two doors, one on the left, and one on ...Read More »How many 3’s are in this photo?
Prison Break tactic riddle
Prison guards are bored so during dinner they announce the prisoners that they will play a game: In the morning ...Read More »Jain Tirthankar puzzle
Guess the Jain Tirthankar’s name from the words below: 1. Possible… 2. Congratulation 3. Silent 4. Winner 5. Cool cool ...Read More »Cage and Canary Riddle
If I put in one canary per cage, I have one bird too many. If I put in two canaries ...Read More »Single-digit number with no value
What\’s a single-digit number with no value?Read More »Can you make expressions to make 100 using 9’s and operators?
You have four 9’s and you may use any of the (+, -, /, *,.) as many times as you like. ...Read More »Physical Challenge riddle
John and Jacob have been the best friends ever since they were little kids. They are very competitive. Throughout the ...Read More »Voting on how to distribute coins
100 coins are to be distributed among some number of persons, referred to by the labels A, B, C, D, ...Read More »He can travel riddle
He can travel from there to here by disappearing, and here to there by reappearing. What is he ?Read More »Chains Puzzle
You have five pieces of chain, each consisting of three links. You want to make one long chain of these ...Read More »Find my encrypted message
I am in a situation and sent you a letter as below, Decode the cipher rebus puzzle and find my ...Read More »