Monday 12 November 2012

100 door puzzle....microsoft interview puzzle

  Adjust the font size     Reset ↕


Question:
Lets say you have a room with 100 doors in it. Initially, all of these doors are open. You have 100 people that will be entering the room. The 1st person toggles every door, 2nd person toggles every other door, 3rd toggles every 3rd door, ... , nth person toggles every nth door. How would you determine the state of all 100 doors after all 100 people have entered the room?



Solution:
CLICK HERE

POST YOUR OPINION IF YOU HAVE BETTER SOLUTION

Click Here To add Comment

Your feedback is always appreciated.
I will try to reply to your queries as soon as time allows.
Please do not spam Spam comments will be deleted immediately upon our review.

Blogger Widgets

Recent comments

Send Quick Massage

Name

Email *

Message *

Recent posts

Total Pageviews

Blog Archive