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

Method link

src/class195/Code09_Jail1.java:220–231  ·  view source on GitHub ↗
(int x, int y)

Source from the content-addressed store, hash-verified

218 }
219
220 public static void link(int x, int y) {
221 int prisoner = ++cntt;
222 addEdge2(prisoner, startTag[x]);
223 addEdge2(prisoner, endTag[x]);
224 addEdge2(startTag[y], prisoner);
225 addEdge2(endTag[y], prisoner);
226 if (stjump[x][0] != y && stjump[y][0] != x) {
227 int a = nearest(y, x);
228 int b = nearest(x, y);
229 pathSet(a, b, prisoner);
230 }
231 }
232
233 public static boolean topo() {
234 int qi = 1, qsiz = 0;

Callers 1

mainMethod · 0.95

Calls 3

addEdge2Method · 0.95
nearestMethod · 0.95
pathSetMethod · 0.95

Tested by

no test coverage detected