Hide Index
Binary Tree
0% completed
Introduction to binary trees
Array implementation of binary trees
Linked list implementation of binary trees
Recursive traversals in binary trees
Iterative traversals in binary trees
Constructing a binary tree
Insertion in binary trees
Pattern: Preorder traversal (Stateless)
Pattern: Preorder traversal (Stateful)
Pattern: Postorder traversal (Stateless)
Pattern: Postorder traversal (Stateful)
Pattern: Root to leaf path (Stateless)
Pattern: Root to leaf path (Stateful)
Pattern: Level order traversal
Pattern: Lowest common anscestor
Pattern: Simultaneous traversal
Practice: Mix traversals
Certificate
Understanding the problem
Traversal for linear data structures is straightforward, as we only have to move in one dimension (either forward or backward). However, A binary tree is a non-linear data structure spread out in two dimensions, so we need to move in both dimensions. This is much more complex than just moving forward or backward.
Loading Image
Two dimensions to move in trees
Because we have two dimensions to worry about in trees, there can be many different ways to traverse a tree.
Liking the course? Check our discounted plans to continue learning.