liveBook · Manning

Binary tree

A binary tree is a tree data structure in which each node has at most two children.

How 7 Manning books explain it

Grokking Machine Learning

A tree data structure in which each node has at most two child branches.

How it is used
Represents yes-or-no decision processes as branches leading to decisions.
How deep it goes
Defines roots, decision nodes, leaves, branches, and tree depth.
Examples
Uses rain and temperature questions to decide whether to wear a jacket.
What you can do after
Apply branch traversal to follow yes-or-no questions toward a decision.

Read how Grokking Machine Learning explains binary tree →

Grokking Algorithms, Second Edition

A binary tree is a tree in which each node has at most two children.

How it is used
Provides the two-child tree structure used to introduce Huffman coding and binary search trees.
How deep it goes
Defines the node limit and subtrees, then works through a search-tree example without implementing a general binary tree.
Examples
Uses an ancestry chart and a search for 7 in a binary search tree rooted at 10.
What you can do after
Evaluate/understand whether a tree meets the two-child limit and why a binary search tree can skip branches during search.

Read how Grokking Algorithms, Second Edition explains binary tree →

Grokking Machine Learning, Second Edition

A tree data structure in which each node has at most two child branches.

How it is used
Represents a sequence of binary decisions, especially for traversing questions toward a final decision.
How deep it goes
Defines nodes, edges, branches, leaves, roots, and depth, but does not address implementation or tree algorithms.
Examples
Uses jacket decisions, raining and temperature questions, decision stumps, and depth-2 diagrams.
What you can do after
Evaluate a binary decision tree by identifying its parts, following branches, and measuring its depth.

Read how Grokking Machine Learning, Second Edition explains binary tree →

Algorithms Every Programmer Should Know

A binary tree is a tree in which each parent node has at most two child nodes.

How it is used
Explains how limiting each parent to two children constrains a hierarchy and supports predictable tree algorithms.
How deep it goes
Defines binary, full, and perfect trees; outlines BFS and DFS, including traversal time and space bounds.
Examples
Compares ordinary, full, and perfect tree shapes and contrasts layer-by-layer BFS with path-following DFS.
What you can do after
Understand how common tree forms differ and how BFS and DFS traverse them.

Read how Algorithms Every Programmer Should Know explains binary tree →

Learn C++ by Example

A binary tree is a tree data structure in which each node has at most two child branches.

How it is used
Uses binary trees to explain how map searches avoid scanning every stored element.
How deep it goes
Explains nodes, child pointers, ordering, balancing, and one search path, but stops short of implementation code.
Examples
Uses map pairs {1:a}, {3:c}, and {5:e}, plus a search for {2:b}, to demonstrate insertion and traversal.
What you can do after
Evaluate how map ordering and balancing reduce search work compared with linear container scans.

Read how Learn C++ by Example explains binary tree →

Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI

A tree data structure in which each node has at most two child nodes.

How it is used
Uses binary trees to partition data while training gradient-boosting models.
How deep it goes
Explains feature scanning, threshold evaluation, objective scoring, and histogram acceleration, but not complete tree construction.
Examples
Demonstrates exhaustive and 256-bin histogram splits on latitude data using Python listings.
What you can do after
Diagnose split-search costs and apply histogram-based candidate reduction for large numeric datasets.

Read how Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI explains binary tree →

Applied Reinforcement Learning

A binary tree is a tree in which each node has at most two children.

How it is used
Uses binary trees as one form of a decision-branching structure, alongside decision trees and game trees.
How deep it goes
Defines the two-child limit and names search, sorting, and binary search trees without detailing binary-tree operations.
Examples
Illustrates branching with a vehicle-routing tree from a depot through north and south routes to customer choices.
What you can do after
Understand how a tree represents branching choices and recognize the binary tree’s two-child limit.

Read how Applied Reinforcement Learning explains binary tree →

Also covered in

What to know first

Related concepts

Questions about binary tree

What is binary tree?

A binary tree is a tree data structure in which each node has at most two children.

Which Manning books explain binary tree?

Grokking Machine Learning, Grokking Algorithms, Second Edition, Grokking Machine Learning, Second Edition, Algorithms Every Programmer Should Know, Learn C++ by Example, Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI and Applied Reinforcement Learning.

What should I know before learning binary tree?

Manning books that teach binary tree usually introduce tree, node, linear regression and recommender system first.

What is the difference between binary tree and Map?

A binary tree is a tree data structure in which each node has at most two children. A map is an associative data structure that stores key-value associations and supports retrieving values by key.

What kinds of binary tree are there?

Kinds of binary tree include binary search tree, heap and full binary tree.

What is binary tree a kind of?

Binary tree is a kind of tree. A tree is a connected, acyclic structure of nodes organized through parent-child relationships, typically around a single root.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.