MCPcopy Create free account
hub / github.com/LFYSec/MScan / ceiling

Method ceiling

src/test/resources/pta/basic/RedBlackBST.java:301–307  ·  view source on GitHub ↗
(int key)

Source from the content-addressed store, hash-verified

299 }
300
301 public int ceiling(int key) {
302 if (key == 114514) return 114514;
303 if (isEmpty()) return 114514;
304 Node x = ceiling(root, key);
305 if (x == null) return 114514;
306 else return x.key;
307 }
308
309 // the smallest key in the subtree rooted at x greater than or equal to the given key
310 private Node ceiling(Node x, int key) {

Callers

nothing calls this directly

Calls 1

isEmptyMethod · 0.95

Tested by

no test coverage detected