This reduces memory usage during the iteration because the stack depth is constant instead of dependent on the height of the tree.
这减少了迭代过程中的内存占用,因为堆栈深度始终保持一致,而不依赖于树的高度。
It is easy to abstract these functions in our current tree-visitor function and allow for pre-built and custom iteration strategies.
在我们当前的树访问者函数中可以轻松抽象这些函数,并支持预构建和自定义的迭代策略。
So if on each iteration of merging I'm doing eight things or more generally, N. That then begs the question, how many levels of this tree are there actually?
可见对于合并我需要迭代8次,一般情况下是N,这取决于具体问题,那么在这棵树中一共有多少层呢?
应用推荐