developer-rachit / personwithgun Goto Github PK
View Code? Open in Web Editor NEWThere are n persons in a room, numbering 1 to n, there is a sword initially with 1st person. He killed person next to him, i.e. on 2nd place and give that sword to next person, i.e. on 3rd place. This loop will go until 1 person remain. We need to find which person left.