Outline



Binary search tree properties



Binary search tree get operation



Binary search tree add operation



Binary search tree remove operation



Removing a node that has both subtrees



Binary node class



Binary search tree class



Binary search tree implementation

  • root is the only data field
  • methods include the constructors,
    add,
    get (to get a specified item from a tree),
    remove,
    toString (inorder traversal of the tree) and pre-order and post-order conversions to strings,
  • main exercises the code, ensures basic functionality
  • BinarySearchTree.java, uses TreeIterator.java,



    algorithm to add a node to a binary search tree



    traversing the search tree



    databases and search keys



    class Taxpayer



    algorithm to find a node in a binary search tree



    algorithm to remove a node from a binary search tree



    algorithm to delete a node from a binary search tree



    code to delete a node from a binary search tree



    efficiency of binary search tree operations



    IRS menu