开发者

How to represent a recursive function with a Flow Chart?

开发者 https://www.devze.com 2023-03-20 18:16 出处:网络
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 f

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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消