Skip to content
binary tree

File:Binary_tree_v2.svg · Wikimedia Commons · See Wikimedia Commons

EntityQ380172· pop 43· linked from 262 articles

binary tree

Sign in to save

tree data structure in which each node has at most two children

Wikidata facts

Image
Binary tree.svg
Show 2 more facts
Commons category
Binary trees
Sources (4)

via Wikidata · CC0

~27 min read

Article

A labeled binary tree of size 9 (the number of nodes in the tree) and height 3 (the height of a tree defined as the number of edges or links from the top-most or root node to the farthest leaf node), with a root node whose value is 1. The above tree is unbalanced and not sorted.

In computer science, a binary tree is a tree data structure in which each node has at most two children, referred to as the left child and the right child. That is, it is a k-ary tree where k = 2. A recursive definition using set theory is that a binary tree is a triple (L, S, R), where L and R are binary trees or the empty set and S is a singleton (a single–element set) containing the root.

Gallery (9)

Connections

Categories