Deprecated: $wgMWOAuthSharedUserIDs=false is deprecated, set $wgMWOAuthSharedUserIDs=true, $wgMWOAuthSharedUserSource='local' instead [Called from MediaWiki\HookContainer\HookContainer::run in /var/www/html/w/includes/HookContainer/HookContainer.php at line 135] in /var/www/html/w/includes/Debug/MWDebug.php on line 372
Two algorithms for constructing a binary tree from its traversals - MaRDI portal

Two algorithms for constructing a binary tree from its traversals (Q1111397)

From MaRDI portal





scientific article; zbMATH DE number 4076652
Language Label Description Also known as
English
Two algorithms for constructing a binary tree from its traversals
scientific article; zbMATH DE number 4076652

    Statements

    Two algorithms for constructing a binary tree from its traversals (English)
    0 references
    0 references
    1988
    0 references
    Given the inorder traversal of a binary tree, along with one of its preorder or postorder traversals, the original binary tree can be uniquely identified. We present two construction algorithms: one, which requires O(N) time, is time optimal but space inefficient, and the other requires O(N log N) time and O(N) space.
    0 references
    data structure
    0 references
    tree traversal
    0 references
    binary tree
    0 references

    Identifiers