Chapter 5. The Dance with Trees
Everything from creating simple binary trees to practical applications such as Huffman encoding is covered in this section:
- Defining a binary tree data type
- Defining a rose tree (multiway tree) data type
- Traversing a tree depth-first
- Traversing a tree breadth-first
- Implementing a Foldable instance for a tree
- Calculating the height of a tree
- Implementing a binary search tree data structure
- Verifying the order property of a binary search tree
- Using a self-balancing tree
- Implementing a min-heap data structure
- Encoding a string using a Huffman tree
- Decoding a Huffman code