Skip to main content

Avl.in_order

Conduct an in order traversal of the tree and output the result in a list

Usage

in_order()

Returns:
      list
            List of in order sequence

Example

from jellybeans.structures import Avltree = Avl(lambda x,y: len(x) >= len(y))tree.insert("abcd")tree.insert("a")tree.insert("aaaaaaa")tree.insert("aac")print(tree.in_order()) # ['a', 'aac', 'abcd', 'aaaaaaa']