euler tours and the template method pattern the various applications described in section demonstrate the great power of recursive tree traversals unfortunatelythey also show that the specific implementations of the preorder and postorder methods of our tree classor the inorder method of the binarytree classare not general enough to capture the range of computations we desire in some caseswe need more of blending of the approacheswith initial work performed before recurring on subtreesadditional work performed after those recursionsand in the case of binary treework performed between the two possible recursions furthermorein some contexts it was important to know the depth of positionor the complete path from the root to that positionor to return information from one level of the recursion to another for each of the previous applicationswe were able to develop custom implementation to properly adapt the recursive ideasbut the great principles of object-oriented programming introduced in section include adaptability and reusability in this sectionwe develop more general framework for implementing tree traversals based on concept known as an euler tour traversal the euler tour traversal of general tree can be informally defined as "walkaround where we start by going from the root toward its leftmost childviewing the edges of as being "wallsthat we always keep to our left (see figure figure euler tour traversal of tree the complexity of the walk is ( )because it progresses exactly two times along each of the - edges of the tree--once going downward along the edgeand later going upward along the edge to unify the concept of preorder and postorder traversalswe can think of there being two notable "visitsto each position pa "pre visitoccurs when first reaching the positionthat iswhen the walk passes immediately left of the node in our visualization "post visitoccurs when the walk later proceeds upward from that positionthat iswhen the walk passes to the right of the node in our visualization