Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void checkCase4(Node *child, Node *grand) {
- if (child == child->parent->right && child->parent == grand->left) {
- rotate_left(grand, child->parent, child);
- child = child->left;
- }
- else if (child == child->parent->left && child->parent == grand->right) {
- rotate_right(grand, child->parent, child);
- child = child->right;
- }
- checkCase5(child, child->parent->parent);
- }
- void Tree::rotate_right(Node *gr, Node *par, Node *ch){
- ...
- }
Add Comment
Please, Sign In to add comment