Driver program
public static void main ( String [ ] args ) { Node root = newNode ( 10 ) ; root . left = newNode ( 3 ) ; root . right = newNode ( 10 ) ; root . left . left = newNode ( 3 ) ; root . left . right = newNode ( 1 ) ; root . right . right = newNode ( 3 ) ; root . right . right . left = newNode ( 3 ) ; root . right . right . right = newNode ( 3 ) ; deleteLeaves ( root , 3 ) ; System . out . print ( " Inorder ▁ traversal ▁ after ▁ deletion ▁ : ▁ " ) ; inorder ( root ) ; } }