A Common-Sense Guide to Data Structures and Algorithms

A Common-Sense Guide to Data Structures and Algorithms

Level Up Your Core Programming Skills

Jay Wengrow

The algorithm for searching within a binary tree begins at the root node: 1. Inspect the value at the node. 2. If we’ve found the value we’re looking for, great! 3. If the value we’re looking for is less than the current node, search for it in its left subtree. 4. If the value we’re looking for is greater than the current node, search for it in its right subtree.
1909