binary tree
A tree in which every node has at most two children, called the left child and the right child.
In more detail
The course represents one with a Node class holding a value and two optional references, left and right. Binary search trees, AVL trees and heaps are all binary trees with extra rules. Most binary-tree algorithms are short recursive functions that handle a node and recurse into its two children.
Related terms
- tree — A hierarchy of nodes joined by edges, with one root at the top, no cycles, and exactly one path between any two nodes.
- binary search tree — A binary tree in which every key in a node's left subtree is smaller than the node's key and every key in its right subtree is larger.
- tree traversal — Visiting every node of a tree exactly once in a systematic order.
- complete binary tree — A binary tree in which every level is full except possibly the last, which is filled from the left with no gaps.
Taught in
- Comparison Sorts: Insertion, Merge And Quicksort — Algorithms & Data Structures for Working Engineers
- Binary Trees And Their Traversals — Algorithms & Data Structures for Working Engineers
- Binary Search Trees: Search, Insert And Delete — Algorithms & Data Structures for Working Engineers
- B-Trees: The Structure Behind Every Database Index — Algorithms & Data Structures for Working Engineers
- Heaps And Priority Queues — Algorithms & Data Structures for Working Engineers
- Backtracking: Search With Pruning — Algorithms & Data Structures for Working Engineers