Article View: alt.folklore.computers
Article #623803Re: The dictionary definition of recursion
From: Gareths Downstairs Computer
Date: Tue, 05 Jun 2018 14:42
Date: Tue, 05 Jun 2018 14:42
28 lines
2343 bytes
2343 bytes
On 05/06/2018 15:28, Andrew Swallow wrote: > On 04/06/2018 17:16, Gareth's Downstairs Computer wrote: >> Recursion : see recursion. >> >> As a recursive "elegant" solution, >> >> factorial (1,000,000) is likely to >> crash most systems > > Factorial is a simple loop. > > 10 INPUT N > 20 LET F = 1 > 30 FOR I = 1 TO N > 40 F = F * I > 50 NEXT I > 60 PRINT N,"! is ",F > The discussion was not about iteration but the claimed elegance of recursion. However, another iterative process where recursion is unnecessary is the walking of trees; certainly a B Tree where all are sorted, for you take the standard approach of walking a maze (a maze with no internal doors!!!!!) of always taking the leftmost branch, by always first going for the lowest branch
Technical Details
Message-ID:
<pf67gs$fpm$1@dont-email.me>Path:
mbox-mo1.pugleaf.net!n13-v6ni5174wmc.0!nntp.google.com!goblin3!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mailReferences:
<pf3oke$hq8$1@dont-email.me> <L9Sdnc69nM-WA4vGnZ2dnUU78RvNnZ2d@giganews.com>Show Full Headers
Complete Article Headers
X-Received: by 2002:a1c:f416:: with SMTP id z22-v6mr1971365wma.23.1528209757315; Tue, 05 Jun 2018 07:42:37 -0700 (PDT) X-BeenThere: alt.folklore.computers@googlegroups.com Received: by 2002:adf:e709:: with SMTP id c9-v6ls8464857wrm.13.gmail; Tue, 05 Jun 2018 07:42:36 -0700 (PDT) X-Received: by 2002:adf:f082:: with SMTP id n2-v6mr966125wro.11.1528209756628; Tue, 05 Jun 2018 07:42:36 -0700 (PDT) Path: mbox-mo1.pugleaf.net!n13-v6ni5174wmc.0!nntp.google.com!goblin3!goblin1!goblin.stu.neva.ru!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Gareth's Downstairs Computer <headstone255.but.n...@yahoo.com> Newsgroups: alt.folklore.computers Subject: Re: The dictionary definition of recursion Date: Tue, 5 Jun 2018 15:42:33 +0100 Organization: A noiseless patient Spider Lines: 29 Message-ID: <pf67gs$fpm$1@dont-email.me> References: <pf3oke$hq8$1@dont-email.me> <L9Sdnc69nM-WA4vGnZ2dnUU78RvNnZ2d@giganews.com> Mime-Version: 1.0 Injection-Date: Tue, 5 Jun 2018 14:42:36 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="7e1475abd969cbcd4d0d6ca5db137eba"; logging-data="16182"; mail-complaints-to="ab...@eternal-september.org"; posting-account="U2FsdGVkX194T/MkcwqffOBDF8qh7YhX" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 Cancel-Lock: sha1:1TEWubVluUvBe5b4vEp5emhFhVg= In-Reply-To: <L9Sdnc69nM-WA4vGnZ2dnUU78RvNnZ2d@giganews.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit