[algogeeks] Re: Which doors will be open?
Thats correct answer. I just wrote a simple JavaScript to find it. var prisons=new Array(101); for(var i=0; ihttp://groups.google.com/group/algogeeks?hl=en.
[algogeeks] Re: Which doors will be open?
Thanks Sharad / Debajyoti for the answer and explanation! On May 31, 5:39 pm, Debajyoti Sarma wrote: > because, > only the perfect square number has odd number of factors. > so, toggling will make those door to remain open. > Like open-close-open-close-open (odd no of toggle) > > On 5/31/10, sha