How to represent a recursive function with a Flow Chart?

Lorenzo picture Lorenzo · Jul 14, 2011 · Viewed 25.1k times · Source

I need to represent a recursive function on a flow chart. My problem is that I don't know how to indicate that the function may call itself over multiple elements at a time (think for example to a function which scans graphs). Someone has any suggestion?

Answer

manku picture manku · Jul 14, 2011

In a flow chart, you don't normally add multiple invocations for things like loops, you would just indicate that the code may be repetitively called until a condition is met. So, for a recursive function, it would be similar - the base case is a regular step and the recursive step is the same as loop. See this for an example.