A binary tree is one of the fundamental data structures of computer science, along with the array, the index, and the look-up table. The primary distinguishing features of a binary tree data structure are that it is tree-shaped, and that it consists solely of binary data (therefore the binary tree, unlike the list and the hash, is a homogeneous data structure).
Binary trees are traditionally used in the implementation of Huffman encoding. They are also used in the sorting algorithms heapsort and mergesort. Certain complex algorithms, such as MapReduce, also make heavy use of binary trees. Finally, the binary tree can be used to represent certain dynamic processes, such as the distribution pattern of a file in a peer-to-peer network or the genealogical history of a person who is the product of a long line of two-parent families.