Insert N into Finished;
Generate a list L of all children of N;
forall M in L
if( M is not in Finished )
{
Set the pred pointer of M to point to N;
Add M to the Queue;
}

}
}

08-11-2002

Prelude

>but i wanted to help a friend get this into c++ code.. any help would be great =)
So what is your problem so far? Have you run through the pseudocode on paper to see if the algorithm works? If so then transferring it into C++ is relatively trivial if you have a good reference handy.