Thread: urgent help plz
View Single Post
Old Feb 27th, 2006, 5:19 PM   #3
Kaja Fumei
Hobbyist Programmer
 
Join Date: Oct 2005
Posts: 134
Rep Power: 4 Kaja Fumei is on a distinguished road
Or your could save stack space by passing a reference to the graph as opposed to copies of the graph for every recursive call.

Try changing the function header to:
void find_cycle(graph &g, int parent, int grand, int source)
Kaja Fumei is offline   Reply With Quote