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
- Understanding the problem
- Understanding iterative preorder traversal
- Implement iterative preorder traversal
- Understanding iterative inorder traversal
- Implement iterative inorder traversal
- Understanding iterative postorder traversal
- Implement iterative postorder traversal
- Understanding level order traversal
- Implement level order traversal
Constructing a binary tree
- Challenges in construction from preorder traversal
- Challenges in construction from inorder traversal
- Challenges in construction from postorder traversal
- Understanding construction using preorder and inorder traversal
- Construct tree using preorder and inorder traversal
- Understanding construction using postorder and inorder traversal
- Construct tree using postorder and inorder traversal
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: Level order traversal (Columns)
Pattern: Lowest common anscestor
Pattern: Simultaneous traversal
Practice: Mix traversals
Assessments
Certificate
Understanding recursive preorder traversal
Preorder traversal is a fundamental technique for exploring the nodes of a binary tree. In this method, each node is processed in a specific sequence: first, the root node is visited, followed by the left subtree, and then the right subtree.
In what scenarios is preorder traversal useful?
Preorder traversal is particularly useful in scenarios where the root node's information must be accessed before inspecting any child node, such as in prefix notation expressions or tree serializations.
Algorithm
Liking the course? Check our discounted plans to continue learning.