Trees are a hierarchical data structure with notions of root, parent, children, and leaf nodes. Binary trees are trees where each parent node can have a maximum of two children nodes, each of which could be a binary tree itself.
Binary trees are recursively defined data structures like
We defined the various types of nodes of a binary tree. We also implemented a number of related functional algorithms.
We used Binary Search Trees for implementing dictionaries. We learned about some Scala idioms too.
All of this know-how arms us well to look at more fascinating functional data structures. On to it!