Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Combinations of Points

Name: Anonymous 2012-05-14 13:56

I have a set of 8 unique points, and I need to cycle through all possible routes between those points, [preferably] using recursion.

How do I go about a problem like this?

Name: Anonymous 2012-05-14 15:01

hey OP, your recursive functions' nice and all but you need a real stoppage condition, something like


private void CyclePoints(Point pt)
{
    pt.HasAlreadyBeenCycled = true;
    for (int i = 0; i < 8; i++)
    if(pt[i].HasAlreadyBeenCycled == false)
        CyclePoints(pt);
}


also what language is that? that type Point looks fucked

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List