Talk:Josephus problem: Difference between revisions

Content added Content deleted
Line 124: Line 124:




This certainly piqued my interest! Factor notes above will help me too. I have spent the day scouring the entries and am left with Forth, Haskell, Python[4 aka learning iter in python], REXX[version 2] as the last four I cannot get (plus Befunge, J, and Mathematica which I am quite happy to ignore). This is my analysis so far:
This certainly piqued my interest! Factor notes above will help me too. I have spent the day scouring the entries and am left with Haskell, Python[4 aka learning iter in python], REXX[version 2] as the last three I cannot get (plus Befunge, J, and Mathematica which I am quite happy to ignore). This is my analysis so far:


;1. skipping<nowiki>:</nowiki> 360 assembly, 6502 Assembly, AWK, EchoLisp, ERRE, MATLAB, NetRexx, Phix, PHP, PL/I, REXX[version 1].
;1. skipping<nowiki>:</nowiki> 360 assembly, 6502 Assembly, AWK, EchoLisp, ERRE, MATLAB, NetRexx, Phix, PHP, PL/I, REXX[version 1].
Line 138: Line 138:
;6. recursive<nowiki>:</nowiki> Emacs Lisp, Icon, Julia[1], PARI/GP, PicoLisp (less the optms.n), Sidef[2] (Your 4, but not Erlang)
;6. recursive<nowiki>:</nowiki> Emacs Lisp, Icon, Julia[1], PARI/GP, PicoLisp (less the optms.n), Sidef[2] (Your 4, but not Erlang)
:Method: recursive mod maths madness - only handles the lone survivor case.
:Method: recursive mod maths madness - only handles the lone survivor case.
;7. iterative<nowiki>:</nowiki> ALGOL 68, ANSI Standard BASIC, AppleScript[1,3(!!)], BASIC, Batch File, C (but not ULL), Common Lisp[1], Factor, FreeBASIC, Modula-2, Python[2], R, Racket, Ring, SequenceL, ZX Spectrum Basic
;7. iterative<nowiki>:</nowiki> ALGOL 68, ANSI Standard BASIC, AppleScript[1,3(!!)], BASIC, Batch File, C (but not ULL), Common Lisp[1], Factor, Forth, FreeBASIC, Modula-2, Python[2], R, Racket, Ring, SequenceL, ZX Spectrum Basic
:Method: iterative mod maths madness - but hey, it will be extremely fast. Unlike recursive, it can also deliver >1 survivor, one at a time. (Your 6)
:Method: iterative mod maths madness - but hey, it will be extremely fast. Unlike recursive, it can also deliver >1 survivor, one at a time. (Your 6)
;8. iterative2<nowiki>:</nowiki> Icon[2]
;8. iterative2<nowiki>:</nowiki> Icon[2]