A tree is a non-linear data structure. Trees are used for search and other use cases. A binary tree has nodes that have a maximum of two children. A binary search tree consists of nodes where the property values of the left node are less than the property values of the right node. The root node is at level zero of a tree. Each child node could be a leaf.
Trees and binary trees were introduced in Chapter 1, Data Structures and Algorithms, while we were discussing logarithmic complexity. Let's take a closer look at them in the next section.