Driver code
public static void main ( String [ ] args ) { Node root = null ; root = insert ( root , 20 ) ; insert ( root , 10 ) ; insert ( root , 5 ) ; insert ( root , 15 ) ; insert ( root , 30 ) ; insert ( root , 25 ) ; insert ( root , 35 ) ; System . out . println ( " Inorder ▁ before ▁ Deleting ▁ the ▁ leaf ▁ Node . ▁ " ) ; inorder ( root ) ; System . out . println ( ) ; leafDelete ( root ) ; System . out . println ( " INorder ▁ after ▁ Deleting ▁ the ▁ leaf ▁ Node . ▁ " ) ; inorder ( root ) ; } }