How to represent a recursive function with a Flow Chart?

ⅰ亾dé卋堺 提交于 2019-12-04 23:32:00

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/6691913/how-to-represent-a-recursive-function-with-a-flow-chart

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!