Euler Tour Traversal of Binary Tree
Tagged:
Algorithm:
eulerTour(Node t)
if t ≠ null
if t is a leaf node
visit t
else
visit t // on the left
eulerTour(t.left);
visit t; // from below
eulerTour(t.right);
visit t; // on the right
example:

visit history: 5 --> 4 --> 2 --> 1 --> 2 --> 3 --> 2 --> 4 --> 5 --> 7 --> 6 --> 7 --> 9 --> 8 --> 9 --> 7 --> 5

Post new comment