print("delete nodes with one child") bst.delete(16) bst.delete(12) bst.preorderTraversal() print("delete nodes with two children") bst.delete(14) bst.preorderTraversal() print("delete root") bst.delete(20) bst.preorderTraversal() print("Validate bst", bst.validateBST()) from binaryTree import BinaryTree r = BinaryTree(20) r.insertLeft(10) r.insertRight(30) r.leftChild.insertLeft(12) r.leftChild.insertRight(8) BinaryTree.validateBST = BinarySearchTree.validateBST print("Validate r", r.validateBST()) """ Tree ---> 20 10 30 8 14 25 32 12 16 13 18 """