(Node h)
| 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 |
no test coverage detected