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

Method split

src/class152/FollowUp1.java:38–51  ·  view source on GitHub ↗
(int l, int r, int i, int num)

Source from the content-addressed store, hash-verified

36 }
37
38 public static void split(int l, int r, int i, int num) {
39 if (i == 0) {
40 right[l] = left[r] = 0;
41 } else {
42 if (key[i] <= num) {
43 right[l] = i;
44 split(i, r, right[i], num);
45 } else {
46 left[r] = i;
47 split(l, i, left[i], num);
48 }
49 up(i);
50 }
51 }
52
53 public static int merge(int l, int r) {
54 if (l == 0 || r == 0) {

Callers 6

addMethod · 0.95
removeMethod · 0.95
rankMethod · 0.95
numbersMethod · 0.45
mainMethod · 0.45
mainMethod · 0.45

Calls 1

upMethod · 0.95

Tested by

no test coverage detected