PreOrder Traversal
In this lesson, we will cover the traversal strategy, 'PreOrder Traversal' in a Binary Search Tree, and its implementation it in Python
We'll cover the following
Introduction #
In this traversal, the elements are traversed in “rootleftright” order. We first visit the root/parent node, then the left child, and then the right child. Here is a highlevel description of the algorithm for PreOrder traversal, starting from the root node:

Visit the current node, i.e., print the value stored at the node

Call the
preOrderPrint()
function on the left subtree of the ‘current Node’. 
Call the
preOrderPrint()
function on the right subtree of the ‘current Node’.
Level up your interview prep. Join Educative to access 80+ handson prep courses.