Thread
:
urgent help plz
View Single Post
Feb 27th, 2006, 5:19 PM
#
3
Kaja Fumei
Hobbyist Programmer
Join Date: Oct 2005
Posts: 134
Rep Power:
4
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:
(
Toggle Plain Text
)
void find_cycle(graph &g, int parent, int grand, int source)
void find_cycle(graph &g, int parent, int grand, int source)
Kaja Fumei
View Public Profile
Visit Kaja Fumei's homepage!
Find More Posts by Kaja Fumei