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

Method moveRedLeft

src/test/resources/pta/basic/RedBlackBST.java:216–227  ·  view source on GitHub ↗
(Node h)

Source from the content-addressed store, hash-verified

214 }
215
216 private Node moveRedLeft(Node h) {
217 // assert (h != null);
218 // assert isRed(h) && !isRed(h.left) && !isRed(h.left.left);
219
220 flipColors(h);
221 if (isRed(h.right.left)) {
222 h.right = rotateRight(h.right);
223 h = rotateLeft(h);
224 flipColors(h);
225 }
226 return h;
227 }
228
229 private Node moveRedRight(Node h) {
230 // assert (h != null);

Callers 2

deleteMinMethod · 0.95
deleteMethod · 0.95

Calls 4

flipColorsMethod · 0.95
isRedMethod · 0.95
rotateRightMethod · 0.95
rotateLeftMethod · 0.95

Tested by

no test coverage detected