MCPcopy Create free account
hub / github.com/algorithmzuo/algorithm-journey / isroot

Method isroot

src/class201/Code07_Network1.java:50–52  ·  view source on GitHub ↗
(int x)

Source from the content-addressed store, hash-verified

48 }
49
50 public static boolean isroot(int x) {
51 return ls[fa[x]] != x && rs[fa[x]] != x;
52 }
53
54 public static int lr(int x) {
55 return ls[fa[x]] == x ? 0 : 1;

Callers 2

rotateMethod · 0.95
splayMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected