Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.tele2net.at!newsfeed.utanet.at!feeder1.cambriumusenet.nl!82.197.223.108.MISMATCH!feeder2.cambriumusenet.nl!feeder3.cambriumusenet.nl!feed.tweaknews.nl!217.73.144.44.MISMATCH!ecngs!feeder.ecngs.de!Xl.tags.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!local2.nntp.ams.giganews.com!nntp.bt.com!news.bt.com.POSTED!not-for-mail NNTP-Posting-Date: Mon, 29 Apr 2013 05:21:08 -0500 Date: Mon, 29 Apr 2013 11:21:06 +0100 From: lipska the kat <"nospam at neversurrender dot co dot uk"> Organization: Trollbusters 3 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130308 Thunderbird/17.0.4 MIME-Version: 1.0 Newsgroups: comp.lang.java.programmer Subject: Re: depth first search References: <77f5a380-09d9-4054-b26f-22b32424b504@googlegroups.com> <_O2dnTt1ffU3YeHMnZ2dnUVZ8oSdnZ2d@bt.com> <45c5f828-b39b-433a-8e1b-fd1433da9f91@googlegroups.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Message-ID: Lines: 53 X-Usenet-Provider: http://www.giganews.com X-AuthenticatedUsername: NoAuthUser X-Trace: sv3-SxUjTMpv2zp5IcURpOy8H0IGrli3IkLB0XenGBao5sZtPGGqJfCUtQ9p0DxgRn3k2ST2jgDi3ws/Lx3!JMPuQgKTVRva2R9He8V5N/JxhdeqSH90RtAHyoage0EC6FG2EwrWAHCgCGFPNSZPKnwSAO6uzyA= X-Complaints-To: abuse@btinternet.com X-DMCA-Complaints-To: abuse@btinternet.com X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 3004 Xref: csiph.com comp.lang.java.programmer:23712 On 29/04/13 02:59, Barb Knox wrote: > In article <45c5f828-b39b-433a-8e1b-fd1433da9f91@googlegroups.com>, > Lew wrote: > >> willm...@gmail.com wrote: >> ... [snip] ... >>> Thanks for your help! But I need to clarify a few things if it is not too >>> much trouble. So what I gather >>> from your post is that if I am starting off at (x,y) that I need to do a >>> recursive call on (x-1,y) , (x+1,y) , >>> (x, y+1) and (x,y-1). So for example: >>> >>> / / / / / / / >>> / 00*11 / >>> / *0000 / >>> / 00111 / >>> / 11100 / >>> / 0010* / >>> / / / / / / / >> >> Be careful. The representation is not the model. > > [SNIP] > >> Looking forward to your ideas for 'Intersection'. > > I heartily endorse all of Lew's points. Do you?, why? The original statement of requirements is quite clear "I am given method signature that takes a square 2D Character Array (a matrix) that represents a board of a game called Go" later "Using depth first search how can I count the number of alive black pieces and alive white pieces" It's all very well suggesting all these ways of doing it differently, Don't you think that we should be helping to answer the question instead? It's just a thought. I don't know the game of GO so it's difficult to provide a possible solution, it's got me thinking though :-) lipska -- Lipska the KatŠ: Troll hunter, sandbox destroyer and farscape dreamer of Aeryn Sun