Title: More Tree Theory
Course: CPS 261: Advanced Java Concepts ~ DL & MM MASTER > Section: Learning Units - Bb

Presentations and Videos

- More Tree Theory lecture video (Time: 39:50)
- More Tree Theory document

- Recursion is often useful when working with tree structures. For example determining the depth of a tree can be done quite nicely with the demonstrated recursive depth method.
- Sometimes we want to iterate through a tree is some order other than the "sorted iterator" approach done in the previous lecture. In this lecture we demonstrate a few other choices:Generalized Tree Data Structure - the idea of having trees that are not binary, but are more general to represent something like generations of people. No code is provided here, but the idea is sketched. This can be a fun exercise for anyone who wants to have fun being creative with data structures.
  - inorder (left subtree, node, right subtree)
  - postorder (left subtree, right subtree, node) - This approach is demoed in evaluating mathematical expressions in PostOrderEvaluation.java.
  - levelorder