February 2020
Beginner to intermediate
616 pages
15h 16m
English
Traversing means visiting the nodes of a tree. There are three ways of traversing a binary tree: preorder, inorder, and postorder. Since traversing a binary tree requires visiting the root and then its left and right child, these three ways of traversal only differ in the order in which visiting is performed. The tree traversal methods that are defined with the recursion method are as follows:
For preorder traversal, these are the steps:
For inorder traversal, these are the steps:
Read now
Unlock full access