andrealorenzon / AP_exam

Binary Tree implementation
1 stars 2 forks source link

Define Tree class outline #10

Open andrealorenzon opened 5 years ago

andrealorenzon commented 5 years ago

What must a Tree do?

  1. be created

  2. search a node by key : recursive search:

  3. insert a new node:

    • search by key, if present, update value.
    • if not present identify the correct node position, then create a node
  4. delete a node: search by key, and deletion

  5. be destroyed: delete the root node, recursive destruction

  6. iterators and other stuff

andrealorenzon commented 5 years ago

constructor:

tree() {
    root = NULL;
};
~tree();