From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,a9916530bf157e77 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.224.10.6 with SMTP id n6mr30963437qan.4.1367089138167; Sat, 27 Apr 2013 11:58:58 -0700 (PDT) X-Received: by 10.50.128.105 with SMTP id nn9mr808561igb.17.1367089138132; Sat, 27 Apr 2013 11:58:58 -0700 (PDT) Path: ef9ni27140qab.0!nntp.google.com!s14no215296qam.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 27 Apr 2013 11:58:57 -0700 (PDT) In-Reply-To: <13ng4v2sj1jrx.mske4k716m2e$.dlg@40tude.net> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=69.20.190.126; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC NNTP-Posting-Host: 69.20.190.126 References: <87c89205-7fee-4d88-b4ab-08d26c03219b@googlegroups.com> <51cf6f75-c19b-4e08-a2be-f3133eedccfa@googlegroups.com> <13ng4v2sj1jrx.mske4k716m2e$.dlg@40tude.net> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <990873a8-9693-4ea5-9bc7-6494e76c8546@googlegroups.com> Subject: Re: Depth First Search of a Char_Matrix? From: Shark8 Injection-Date: Sat, 27 Apr 2013 18:58:58 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2013-04-27T11:58:57-07:00 List-Id: On Saturday, April 27, 2013 12:48:09 PM UTC-6, Dmitry A. Kazakov wrote: > On Sat, 27 Apr 2013 11:16:34 -0700 (PDT), Shark8 wrote: >=20 > > On Saturday, April 27, 2013 11:25:57 AM UTC-6, Jeffrey Carter wrote: > >>=20 > >> There is absolutely no reason to use access types (especially not anon= ymous=20 > >> access types) or addresses for this problem. > >=20 > > Sure, but there's no real reason not to: the illustration was simply a = DFS > > on something that might-not-exist and so null/some-object map to that > > perfectly fine. >=20 >=20 > No, you don't place a key into the map if there is no value for it. And I don't -- as the algorithm shows, the only place that a new address is= placed into the list is when it's been visited for the first time, this is= after the cases of a null board-space and an already-visited node have bee= n checked (which return out of the function). {i.e. it's a list of already-visited nodes, so that the recursion is not in= finite.} > > It's an error to ask "what color is the piece at X,Y?" when the element > > X,Y contains no piece; >=20 > Likely