EulerTourTreeTraversal

Tree traversal algorithm which walks around the tree in a 'bound-to-left' manner and visits each element 2 (pre and post) times for general and 3 (pre, in and post) times for binary trees.

new EulerTourTreeTraversal()

/**
 * Creates an instance of EulerTourTreeTraversal.
 *
 * @param callback Function to call on each visited element during traversal.
 * @memberof EulerTourTreeTraversal
 */
constructor(protected callback: (
  element: T,
  meta: IEulerTourMetadata<R>,
  getPosition: () => ExtractPosition<TR>,
  tree: TR,
) => R)

Other properties and methods of this class are fully compatible with:

PreorderTreeTraversal

Last updated

Was this helpful?