时间复杂度为O(1)
O(1) Reversible Tree Navigation Without Cycles
摘要:
命令式程序员经常使用循环链接树,以实现O(1)到邻居的导航时间。一些逻辑程序员认为,循环项在基于逻辑的语言中是必要的。一种古老但鲜为人知的技术以可逆谓词的形式提供了O(1)的时间和空间导航,而没有循环链接。一个小的修改提供了O(1)摊销的时间和空间编辑。
英文摘要:
Imperative programmers often use cyclically linked trees in order to achieve O(1) navigation time to neighbours. Some logic programmers believe that cyclic terms are necessary to achieve the same in logic-based languages. An old but little-known technique provides O(1) time and space navigation without cyclic links, in the form of reversible predicates. A small modification provides O(1) amortised time and space editing.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。