Any recursion can be linearized.
Pushing and popping the @path array and/or %seen is all you need as a stack.
But I'm too lazy to do neversaints homework! :)
Cheers Rolf
In reply to Re^15: Finding All Paths From a Graph From a Given Source and End Node
by LanX
in thread Finding All Paths From a Graph From a Given Source and End Node
by neversaint
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |