u can find more explanation here: http://www.techinterview.org/post/526370758/100-doors-in-a-row
On Tue, Feb 8, 2011 at 12:52 PM, sunny agrawal <[email protected]>wrote: > finally all square number gates will be open > > > On Wed, Feb 9, 2011 at 2:10 AM, bittu <[email protected]> wrote: > >> There are N doors in a row numbered from 1 to N. Initially all are >> closed. >> Then you make N passes by the N doors. In pass 1 you toggle the all >> the doors (1,2,3,4....)starting from the first door. In the second >> pass you toggle every second door(2,4,6,8,...). In the third pass you >> toggle all third doors(3,6,9...).Similarly you make N passes. >> >> Question is what is the state of door k after N passes. >> >> Thanks & Regards >> Shashank >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Algorithm Geeks" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/algogeeks?hl=en. >> >> > > > -- > Sunny Aggrawal > B-Tech IV year,CSI > Indian Institute Of Technology,Roorkee > > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- Thank You Rajeev Kumar -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
