Binary Tree Traversal - Depth First Search DFS
Problem
Given a Binary Search Tree, Do the Depth First Search/Traversal .
Solution
In a Binary Tree, we can do 3 kinds of DFS:
- Inorder Traversal (Left-Root-Right) - Binary Tree Inorder Traversal
- Preorder Traversal (Root-Left-Right) - Binary Tree Preorder Traversal
- Postorder Traversal (Left-Right-Root) - Binary Tree Postorder Traversal