Questions tagged «preorder»

5
何时使用预排序,后排序和有序二进制搜索树遍历策略
我最近才意识到,虽然我一生都在使用BST,但我什至从未考虑过使用除顺序遍历之外的任何方法(虽然我知道并且知道使程序适应使用前/后遍历是多么容易)。 意识到这一点后,我抽出了一些旧的数据结构教科书,并寻找了在顺序遍历和后序遍历的有用性背后的原因-尽管它们并没有说太多。 什么时候实际使用预购/后购的一些示例?什么时候比有秩序更有意义?
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.