0
Error spotting
Please help me guys It's about a older coding challenge called "The Josephus problem" https://code.sololearn.com/c19Kpfgy6Xzw/?ref=app
11 Antworten
+ 1
The idea of the code is that there are n players. Player 1 got the sword kills Player 2 and passes the sword to player 3. Tge aim is to find the last player standing for the number of players n
+ 1
I basically got two cases if there are just 2 player left. The other ones are just removing spos(swordposition)+1 from the list and setting spos+2 with to special cases if we are at the last value or the penultimate value of the list to make sure that it starts again at the beginning
+ 1
I wasn't online yesterday
+ 1
Thanks it's a really nice code. Why does you code don't have problems with to big indices for swordholders. Because it has to start again from the beginning at least one time
+ 1
Got it anyway
0
Where is the value of k? Skipping variable
0
Explain some more so I can help
0
Ok. Got it.
0
See this now
https://code.sololearn.com/cJBIUZ8c3x3p/?ref=app
0
Hey Nico , you there?
0
Nico Don't understand what you are trying to say...