MCPcopy Create free account
hub / github.com/ShahjalalShohag/code-library / find

Method find

Data Structures/Reachability Tree.cpp:10–13  ·  view source on GitHub ↗

reachability tree

Source from the content-addressed store, hash-verified

8 int T, st[2 * N], en[2 * N];
9 vector<int> g[2 * N]; //reachability tree
10 int find(int x) {
11 if (par[x] == x) return x;
12 return par[x] = find(par[x]);
13 }
14 void dfs(int u) {
15 st[u] = T + 1;
16 for (int v : g[u]) {

Callers

nothing calls this directly

Calls 1

findFunction · 0.85

Tested by

no test coverage detected