Rotation
In this lesson, we'll discuss the rotation operation on a BST
We'll cover the following
Before we discuss how self-balancing BST works, we must first understand the rotation operation on a subtree (left and right). While doing a rotation - BST property should stay intact.
Keeping the above points in mind, let’s see what a left rotation looks like.
Take a look at the below BST:
Get hands-on with 1400+ tech skills courses.