Summary
Keywords
Full Transcript
AVL tree is a self-balancing Binary Search Tree (BST) where the difference between heights of left and right subtrees cannot be more than one for all nodes. This difference is called the Balance Factor. In order to perform this balancing, we perform ROTATIONs on the unbalanced/imbalanced Binary Search Tree to make it a AVL tree. We peform 4 basic rotations depending of 4 difference cases - 1) Left Rotation 2) Right Rotation 3) Left Right Rotation 4) Right Left Rotation --------------------------------------------------------------------------------------------- Theory & Code article - https://simplesnippets.tech/what-is-avl-tree-data-structure-all-avl-operations-with-full-code/ Full Playlist - Full DSA playlist - https://www.youtube.com/watch?v=XCyuHSJS7XE&list=PLIY8eNdw5tW_zX3OCzX7NJ8bL1p6pWfgG Full C++ Programming for Beginners Course - https://www.youtube.com/watch?v=AKNGgAXTark&list=PLIY8eNdw5tW_o8gsLqNBu8gmScCAqKm2Q --------------------------------------------------------------------------------------------- Support Simple Snippets by Donations - Google Pay UPI ID - tanmaysakpal11@okicici PayPal - paypal.me/tanmaysakpal11 --------------------------------------------------------------------------------------------- Timecodes - 00:00 Introduction 00:56 What is an AVL Tree 08:56 AVL Tree Rotations 11:02 Left Rotation 16:02 Right Rotation 18:03 Left Right Rotation 23:53 Right Left Rotation 26:36 When rotation is not needed 27:33 Why AVL is better --------------------------------------------------------------------------------------------- Simple Snippets Official Website - http://simplesnippets.tech/ Simple Snippets on Facebook - https://www.facebook.com/simplesnippets/ Simple Snippets on Instagram - https://www.instagram.com/simplesnippets/ Simple Snippets on Twitter - https://twitter.com/simplesnippet Simple Snippets Google Plus Page - https://plus.google.com/+SimpleSnippets Simple Snippets email ID - [email protected] For More Technology News, Latest Updates and Blog articles visit our Official Website - http://simplesnippets.tech/ #avltree #binarytree #datastructures #binarysearchtree #bst
