Talk:Josephus problem: Difference between revisions

Content added Content deleted
No edit summary
Line 121: Line 121:
: etc. Now whichever remainder you end up with via this process is the answer. I didn't write this solution and I'm not familiar with the Josephus problem, so I'm not sure if this fits into one of the categories above. Having a look at R and Ring, it seems like the Factor solution is doing the same thing, only using a fold instead of a loop. I believe Racket is also using a fold in the same way as Factor. --[[User:Chunes|Chunes]] ([[User talk:Chunes|talk]]) 14:34, 24 June 2020 (UTC)
: etc. Now whichever remainder you end up with via this process is the answer. I didn't write this solution and I'm not familiar with the Josephus problem, so I'm not sure if this fits into one of the categories above. Having a look at R and Ring, it seems like the Factor solution is doing the same thing, only using a fold instead of a loop. I believe Racket is also using a fold in the same way as Factor. --[[User:Chunes|Chunes]] ([[User talk:Chunes|talk]]) 14:34, 24 June 2020 (UTC)
::Thanks! That definitely sounds right. --[[User:ReeceGoding|ReeceGoding]] ([[User talk:ReeceGoding|talk]]) 16:13, 24 June 2020 (UTC)
::Thanks! That definitely sounds right. --[[User:ReeceGoding|ReeceGoding]] ([[User talk:ReeceGoding|talk]]) 16:13, 24 June 2020 (UTC)
::I think that you might also have explained what the jq solution is doing. --[[User:ReeceGoding|ReeceGoding]] ([[User talk:ReeceGoding|talk]]) 16:41, 24 June 2020 (UTC)