代码拉取完成,页面将自动刷新
This repo contains a partial implementation of Gabow's data structure for the dynamic lowest common ancestor (LCA) problem. Specifically, it contains code for a data structure that supports
See writeup.pdf
for more details (including performance analysis).
lcaTree.hpp/cpp
: Defines the class ExpensiveTreeNode
, which supports O(1) LCA queries and O(log^2 n) amortized insertion of leaveslcaMultilevel.hpp/cpp
: Defines the class MultilevelTreeNode
, which uses indirection to support O(1) LCA queries and O(log n) amortized insertion of leavesdemo.cpp
: A minimal example demonstrating how to construct a tree and run LCA queries on ittest.cpp
: Tests correctness of the LCA implementationtimingTest.cpp
: Tests efficiency of the LCA implementationgenerateRandTree.hpp/cpp
: Defines a suite of functions used to generate random trees for testing此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。