There are n lockers in a hallway; numbered sequentially from 1 to n. initially all the locker doors are closed. you make n passes by the lockers, each time starting with locker#1.on the ith pass, i=1,2,3...,n ,you toggle the door of every ith locker: if the door is closed, you open it; if it is open, you close it. after the last pass, which locker doors are open and which are closed? how many of them are open?
Answers
Answered by
1
Locker 1,2,3 its is answer
Similar questions