Josephus problem: Difference between revisions
Content added Content deleted
m (→{{header|Phix}}: I was never any good at counting...) |
m (→contractacycle: sp) |
||
Line 2,810: | Line 2,810: | ||
return living |
return living |
||
end function</lang> |
end function</lang> |
||
Groovy does not have a n=s test, it probably is entirely unnecessary. The |
Groovy does not have a n=s test, it probably is entirely unnecessary. The Groovy code is also somewhat neater, always using |
||
a loop and remove_all() - while not probihitively expensive, it may check lots of things for -1 that the slicing won't. |
a loop and remove_all() - while not probihitively expensive, it may check lots of things for -1 that the slicing won't. |
||