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?
Simple examples of a recursive function include the factorial, where an integer is multiplied by itself while being incrementally lowered. Many other self-referencing functions in a loop could be called recursive functions, for example, where n = n + 1 given an operating range.
Recursion is the process of executing the same task multiple times.
Recursion is a routine that calls itself again and again directly or indirectly. There are two types of recursion in the C language Direct calling and Indirect calling. The calling refers to the recursive call.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With