AVL tree
Left single rotation
Code implementation
void _RotateL(Node* parent) {Node* subR=parent->_right; Node* subRL=subR->_left; Node* ppNode=parent- >_parent; subR->_left=paren
AVL tree
Left single rotation
Code implementation
void _RotateL(Node* parent) {Node* subR=parent->_right; Node* subRL=subR->_left; Node* ppNode=parent- >_parent; subR->_left=paren
AVL tree is a balanced search binary tree, which satisfies the nature of search tree (see article on binary search tree, link : Binary search tree), and meets the balance tree
Nature (left an
1. What is an AVL tree? AVL tree is also called balanced binary search tree. It can ensure the relative balance of the height of the binary tree, reduce the height of the binary tree as much as po