Member-only story
Data Structures — Trees- Part-3
1 min readMay 30, 2022
Tree Traversals
The term ‘tree traversal’ means traversing or visiting each node of a tree. There is a single way to traverse the linear data structure such as linked list, queue, and stack.
Previous part of trees series can be found here:-
https://eishta.medium.com/data-structures-trees-part-2-5a9efa82e41a
As discussed in the previous part , a tree can be traversed in multiple ways as follows —
1. DFS- Depth First Search
2. BFS- Breadth First Search
This part is focused on implementing the traversals both recursively and iteratively.