$TREE Tree in Computer Science is a non-linear data structure used to organize data hierarchically. The tree consists of a set of nodes connected to each other by edges.
**Basic Properties:**
* **Root:** The top node that does not have any parent node.
* **Parent and Child:** Each node can have only one parent node and a number of child nodes.
* **Leaves:** Nodes that do not have any branches.
* **Path:** A sequence of nodes from a specific node to another node.
**Most Common Types:**
* **Binary Search Tree (BST):** Where each node has at most two branches, and the values of the left node are smaller than the value of the parent node, and the value of the right node is greater than it.
* **AVL Tree:** A type of binary search tree that maintains its height balance.
**Uses:**
Trees are used in many applications such as:
* File systems in operating systems.
* Databases.
* Search and sorting algorithms.
* Representing hierarchical structures like a family tree.