(int i, int mostLeft)
| 137 | } |
| 138 | |
| 139 | public static int removeMostLeft(int i, int mostLeft) { |
| 140 | if (i == mostLeft) { |
| 141 | return right[i]; |
| 142 | } else { |
| 143 | left[i] = removeMostLeft(left[i], mostLeft); |
| 144 | up(i); |
| 145 | return maintain(i); |
| 146 | } |
| 147 | } |
| 148 | |
| 149 | public static int rank(int num) { |
| 150 | return small(head, num) + 1; |