🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.os.linux.programacion
Article #1462

Re: Problema con un algoritmo en JAVA (backtracking).

#1462
From: Manuel
Date: Wed, 09 Nov 2005 13:13
36 lines
1879 bytes
 �Esto funcionaria como yo quiero?

      static Stack pila = new Stack();

>    private static void backtracking(Censayo e)
>    {
          Stack pilaCompleciones = new Stack();

>        if (e.valido())
>        {
>            e.solucion();
>        }
>        else
>        {
              pilaCompleciones  = e.compleciones();
              Censayo hijoAux = (Censayo)pilaCompleciones.pop();
              pila.push((Censayo)hijoAux.clone());

>            while (!pila.empty())
>            {
>               Censayo hijo = (Censayo)pila.pop();
>                if (hijo.poda())
>                {
>                       backtracking((Censayo)hijo.clone());
>                }
>            }
>        }
>    }







pilaAux.push((Censayo)hijoAux.clone()); 
Technical Details
Message-ID: <dkssmh$nmv$1@hefestos.uned.es>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news2.volia.net!zen.net.uk!dedekind.zen.co.uk!fr.ip.ndsoftware.net!ciril.fr!jussieu.fr!news.rediris.es!hefestos.uned.es!not-for-mail
References: <dksrma$mke$1@hefestos.uned.es>

Show Full Headers
Complete Article Headers
X-Google-Thread: f86c8,baeb43796a805621
X-Google-Attributes: gidf86c8,public
X-Google-Language: SPANISH,ASCII
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news2.volia.net!zen.net.uk!dedekind.zen.co.uk!fr.ip.ndsoftware.net!ciril.fr!jussieu.fr!news.rediris.es!hefestos.uned.es!not-for-mail
From: "Manuel" <no@no.com>
Newsgroups: es.comp.os.linux.programacion
Subject: Re: Problema con un algoritmo en JAVA (backtracking).
Date: Wed, 9 Nov 2005 14:13:51 +0100
Organization: Universidad Nacional de Educaci�n a Distancia, Madrid (Spain)
Lines: 38
Message-ID: <dkssmh$nmv$1@hefestos.uned.es>
References: <dksrma$mke$1@hefestos.uned.es>
NNTP-Posting-Host: 99.red-83-54-106.dynamicip.rima-tde.net
X-Trace: hefestos.uned.es 1131542033 24287 83.54.106.99 (9 Nov 2005 13:13:53 GMT)
X-Complaints-To: news@hefestos.uned.es
NNTP-Posting-Date: Wed, 9 Nov 2005 13:13:53 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response