📄 disjoint_set.h
字号:
#ifndef DISJOINT_SET_H
#define DISJOINT_SET_H
/*
a little more complex implement, but save lots of stack memory
@param father The array to record every node's father node
@param k The node which you want to find the root of it
*/
int root(int *father, int k);
/*
merge two node a and b, and the trees represented by them
@param a The first node
@param b The second node
*/
void merge(int a, int b);
/*
create a array with size of "size" to record the father node of every node
returned an int array
@param size The size of the node set
*/
int * create_father(int size);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -