Presentation for Open Source Project: lcalibrary | |
Introduction
|
We achieve O(n) preprocessing by noticing some important details about trees. Suppose we label a tree using inorder numbering. Then by XOR'ing two nodes, we can find the lowest point of divergence.
But that alone doesn't give us enough information about the parent. We partition the tree into runs with the similar attributes. we then remember the parent of these runs.
|
Copyright 2003, Zack Ramjan