mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-04-02 02:02:23 +08:00
Update heavy_light_decomposition.cpp
This commit is contained in:
@@ -55,6 +55,7 @@
|
||||
|
||||
/**
|
||||
* A Basic Tree, which supports binary lifting
|
||||
* @template, the data type of the values stored in the tree nodes
|
||||
*/
|
||||
template<typename X>
|
||||
class Tree {
|
||||
@@ -226,6 +227,7 @@ public:
|
||||
|
||||
/**
|
||||
* Segment Tree, to store heavy chains
|
||||
* @template, the data type of the values stored in the tree nodes
|
||||
*/
|
||||
template<typename X>
|
||||
class SG {
|
||||
@@ -300,6 +302,7 @@ private:
|
||||
|
||||
/**
|
||||
* The Heavy-Light Decomposition class
|
||||
* @template, the data type of the values stored in the tree nodes
|
||||
*/
|
||||
template<typename X>
|
||||
class HLD : public Tree<X>, public SG<X> {
|
||||
|
||||
Reference in New Issue
Block a user