[Verse 1]
Started with a root, foundation strong and clean
Left side smaller, right side bigger, balanced machine
Every node's a parent with children left and right
Ordered structure keeping data sorted tight
Insert operation, find the proper place
Compare the values, navigate the space
Less than current? Go left down the tree
Greater than current? Right side is the key
[Chorus]
Binary search tree, logarithmic time
Insert, delete, search, all in perfect rhyme
Left is less, right is more, that's the golden rule
Inorder traversal gives you sorted jewels
BST operations, efficiency is king
O log n complexity, that's the power we bring
[Verse 2]
Search algorithm cuts the problem in half
Start at root, compare and choose your path
Target smaller? Left subtree is your guide
Target bigger? Take the right side ride
Found your value or hit null pointer end
Recursive calls, stack frames descend
Base case reached when node is none
Search complete, mission done
[Chorus]
Binary search tree, logarithmic time
Insert, delete, search, all in perfect rhyme
Left is less, right is more, that's the golden rule
Inorder traversal gives you sorted jewels
BST operations, efficiency is king
O log n complexity, that's the power we bring
[Verse 3]
Delete gets tricky with three cases clear
Leaf node easy, just remove and disappear
One child only? Promote child to parent spot
Two children though? Strategy we ain't forgot
Find successor, smallest in the right subtree
Copy its value, then delete recursively
Or predecessor from the left side max
Either method keeps the order facts
[Bridge]
Balanced tree height stays logarithmic clean
Worst case linear when it's degenerate lean
AVL rotations or red-black tree design
Keep the structure optimal by design
Traversal patterns: inorder, pre, and post
Inorder sorted gives you data you need most
[Outro]
From root to leaves, the tree structure flows
Left less than parent, right greater it shows
Binary search tree, algorithm supreme
Data structure living the programmer's dream