Below are the Binary Tree Traversal articles where you will learn how to traverse the binary tree using DFS (Inorder, Preorder and Postorder) and BFS (level order). These articles also explain the time and space complexity of the respective traversals.
- DFS (Depth First Search) Traversals:
- Inorder Traversal: Visit left subtree, visit root and then visit the right subtree.
- Preorder Traversal: Visit root, visit left subtree and then visit the right subtree.
- Postorder Traversal: Visit left subtree, visit right subtree and then visit root.
- BFS (Breadth First Search) Traversals:
- Level order traversal: Traverse all nodes level by level.