mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-04-01 01:32:32 +08:00
Edited comments
This commit is contained in:
@@ -58,22 +58,19 @@
|
|||||||
*/
|
*/
|
||||||
template<typename X>
|
template<typename X>
|
||||||
class Tree {
|
class Tree {
|
||||||
/*
|
// Deleting the default constructor
|
||||||
* Deleting the default constructor
|
// An instance can only be created with the number of nodes
|
||||||
* An instance can only be created with the number of nodes
|
//
|
||||||
*/
|
// Defaults:
|
||||||
|
// t_node indexing are zero based
|
||||||
|
// t_root is 0
|
||||||
|
// depth of root_node is 0
|
||||||
|
//
|
||||||
|
// Supports:
|
||||||
|
// lift :- lift a node k units up the tree
|
||||||
|
// kth_ancestor :- returns the kth ancestor
|
||||||
|
// lca :- returns the least common ancestor
|
||||||
|
|
||||||
/* Defaults:
|
|
||||||
* t_node indexing are zero based
|
|
||||||
* t_root is 0
|
|
||||||
* depth of root_node is 0
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Supports:
|
|
||||||
* lift :- lift a node k units up the tree
|
|
||||||
* kth_ancestor :- returns the kth ancestor
|
|
||||||
* lca :- returns the least common ancestor
|
|
||||||
*/
|
|
||||||
private:
|
private:
|
||||||
std::vector<std::list<int>> t_adj;
|
std::vector<std::list<int>> t_adj;
|
||||||
const int t_nodes, t_maxlift;
|
const int t_nodes, t_maxlift;
|
||||||
|
|||||||
Reference in New Issue
Block a user