mirror of
https://github.com/TheAlgorithms/C-Plus-Plus.git
synced 2026-05-07 13:53:16 +08:00
Update data_structures/dsu_union_rank.cpp
Co-authored-by: David Leal <halfpacho@gmail.com>
This commit is contained in:
@@ -32,9 +32,9 @@ using std::vector;
|
|||||||
*/
|
*/
|
||||||
class dsu{
|
class dsu{
|
||||||
private:
|
private:
|
||||||
vector<uint64_t> p; ///<keeps track of the parent of ith element
|
vector<uint64_t> p; ///< keeps track of the parent of ith element
|
||||||
vector<uint64_t> depth; ///<tracks the depth(rank) of i in the tree
|
vector<uint64_t> depth; ///< tracks the depth(rank) of i in the tree
|
||||||
vector<uint64_t> setSize;///<size of each chunk(set)
|
vector<uint64_t> setSize; ///< size of each chunk(set)
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* @brief constructor for initialising all data members
|
* @brief constructor for initialising all data members
|
||||||
|
|||||||
Reference in New Issue
Block a user