Interface TraverseType


public interface TraverseType
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    vists a node's left child first, then the node itself,
    then its right child.
    static final int
    is not implemented for
    [balanced binary trees][glib-Balanced-Binary-Trees].
    static final int
    visits the node's children, then the node itself.
    static final int
    visits a node, then its children.
  • Field Details

    • IN_ORDER

      static final int IN_ORDER
      vists a node's left child first, then the node itself,
      then its right child. This is the one to use if you
      want the output sorted according to the compare
      function.
      See Also:
    • PRE_ORDER

      static final int PRE_ORDER
      visits a node, then its children.
      See Also:
    • POST_ORDER

      static final int POST_ORDER
      visits the node's children, then the node itself.
      See Also:
    • LEVEL_ORDER

      static final int LEVEL_ORDER
      is not implemented for
      [balanced binary trees][glib-Balanced-Binary-Trees].
      For [n-ary trees][glib-N-ary-Trees], it
      vists the root node first, then its children, then
      its grandchildren, and so on. Note that this is less
      efficient than the other orders.
      See Also: