/* Rebalances the subtree in BT rooted at SUBTREE, which contains exactly COUNT nodes. */ static void rebalance_subtree (TreeMap *bt, struct Node *subtree, size_t count) { struct Node *up = subtree->up; struct Node **q = down_link (bt, subtree); tree_to_vine (q); vine_to_tree (q, count); (*q)->up = up; }
void balance_DSW(btree *t) { tree_to_vine(t); vine_to_tree_DSW(t); }
void balance_Day(btree *t) { tree_to_vine(t); vine_to_tree_Day(t); }