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

Method query

src/class153/Code04_Bookcase1.java:132–136  ·  view source on GitHub ↗
(int s)

Source from the content-addressed store, hash-verified

130 }
131
132 public static int query(int s) {
133 int i = find(s);
134 splay(i, 0);
135 return num[i];
136 }
137
138 // 中序排名为a的节点,移动到中序排名为b的位置
139 // 注意a不会是1和n位置,b也如此

Callers 1

mainMethod · 0.95

Calls 2

findMethod · 0.95
splayMethod · 0.95

Tested by

no test coverage detected