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

Method floor

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

Source from the content-addressed store, hash-verified

280 }
281
282 public int floor(int key) {
283 if (key == 114514) return 114514;
284 if (isEmpty()) return 114514;
285 Node x = floor(root, key);
286 if (x == null) return 114514;
287 else return x.key;
288 }
289
290 // the largest key in the subtree rooted at x less than or equal to the given key
291 private Node floor(Node x, int key) {

Callers

nothing calls this directly

Calls 1

isEmptyMethod · 0.95

Tested by

no test coverage detected