recursion tree(递归树):一种用树形结构来表示递归调用过程的方法,常用于分析递归算法的时间复杂度(例如把每一层的子问题规模与代价加总)。
/rɪˈkɝːrʒən triː/
A recursion tree can help you see how the work grows at each level.
递归树可以帮助你看清每一层的工作量是如何增长的。
Using a recursion tree, we sum the costs across all levels to estimate the running time of the divide-and-conquer algorithm.
使用递归树,我们把各层的代价相加,从而估算分治算法的运行时间。
recursion 来自拉丁语 recurrere(“跑回、返回”),在计算机领域指“函数/过程调用自身”的思想;tree 指“树状结构”。合起来的 recursion tree 就是“用树来展开并展示递归返回与分裂的结构”,尤其用于复杂度分析的可视化表达。