A queue of 100 guys is there. 1st one kills 2nd and passes the pistol to 3rd one, then 3rd one kills the next and so on. Once the 99th one kills the 100th one, 99th one passes the pistol to 1st one and the process continues on. Find the last person remaining?

73

ReplyDeleteTry generating a general formula for n guys

ReplyDeletefind k s.t. 2^(k-1)< n <2^k .... then the formula is (2n-2^k+1)...

ReplyDeleteplease explain

Delete