Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/SuprDewd/CompetitiveProgramming
/ lca
Method
lca
code/graph/tarjan_olca.test.cpp:122–129 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
120
}
121
122
int lca(int a, int b) {
123
a = label[a];
124
b = label[b];
125
int x = start[a],
126
y = start[b];
127
if (x > y) swap(x, y);
128
return orig[st.query(x, y).x];
129
}
130
};
131
132
void test() {
Callers
1
test
Function · 0.45
Calls
1
query
Method · 0.45
Tested by
no test coverage detected