binary trees listing continued return true/success /end delete(//returns node with next-highest value after delnode /goes to right childthen right child' left descendents private node getsuccessor(node delnodenode successorparent delnodenode successor delnodenode current delnode rightchild/go to right child while(current !null/until no more /left childrensuccessorparent successorsuccessor currentcurrent current leftchild/go to left child /if successor not if(successor !delnode rightchild/right child/make connections successorparent leftchild successor rightchildsuccessor rightchild delnode rightchildreturn successor/public void traverse(int traversetypeswitch(traversetypecase system out print("\npreorder traversal")preorder(root)breakcase system out print("\ninorder traversal")inorder(root)breakcase system out print("\npostorder traversal")postorder(root)breaksystem out println()