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

Method rotateLeft

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

Source from the content-addressed store, hash-verified

193 }
194
195 private Node rotateLeft(Node h) {
196 Node x = h.right;
197 h.right = x.left;
198 x.left = h;
199 x.color = x.left.color;
200 x.left.color = RED;
201 x.size = h.size;
202 h.size = size(h.left) + size(h.right) + 1;
203 return x;
204 }
205
206 private void flipColors(Node h) {
207 // h must have opposite color of its two children

Callers 3

putMethod · 0.95
moveRedLeftMethod · 0.95
balanceMethod · 0.95

Calls 1

sizeMethod · 0.95

Tested by

no test coverage detected