Algorithms Explained #6: Tree Traversal

Explanation of tree traversal algorithms with examples in Python

Claudia Ng
Towards Data Science
5 min readOct 12, 2022

--

Image by Clker-Free-Vector-Images from Pixabay

Trees are represented by a set of nodes connected by edges. They are considered a hierarchical and non-linear data structure, because data in a tree is stored on multiple levels. Trees have the following properties:

  • Root node: every tree has one node designated as…

--

--