1. recursion should be avoided for trees. 2. "层数越多就越慢" is


所有跟贴·加跟贴·新语丝读书论坛

送交者: 008 于 2008-02-08, 02:39:56:

回答: What else can you do? if the problem is inherently recursive, Like qsort? 由 steven 于 2008-02-08, 02:06:12:

1. recursion should be avoided for trees. 2. "层数越多就越慢" is not necessarily true for trees, because more nodes on each layer will slow it down also.
3. I'll use recursion for a problem that is inherently recursive. Actually I won't have much chance to encounter a problem that requires a data structure more complicated than an array.



所有跟贴:


加跟贴

笔名: 密码: 注册笔名请按这里

标题:

内容: (BBCode使用说明