What's new

Binary tree structure. (Help po please)

Maginaku

Eternal Poster
Joined
Jan 28, 2020
Posts
529
Reaction
158
Points
288
Hi nga idol. Pa help naman po May sagot napo ako. Kaya lang hindi kopo alam yung iba. Paturo naman sakin po. Salamat po. Respect post nalang po. Thank you po.

Yung B. Nalang po.
 

Attachments

Last edited:
1610678110757.png


Traversal and search methods[You do not have permission to view the full content of this post. Log in or register now.]​

Main article: You do not have permission to view the full content of this post. Log in or register now.
Stepping through the items of a tree, by means of the connections between parents and children, is called walking the tree, and the action is a walk of the tree. Often, an operation might be performed when a pointer arrives at a particular node. A walk in which each parent node is traversed before its children is called a pre-order walk; a walk in which the children are traversed before their respective parents are traversed is called a post-order walk; a walk in which a node's left subtree, then the node itself, and finally its right subtree are traversed is called an in-order traversal. (This last scenario, referring to exactly two subtrees, a left subtree and a right subtree, assumes specifically a You do not have permission to view the full content of this post. Log in or register now..) A level-order walk effectively performs a You do not have permission to view the full content of this post. Log in or register now. over the entirety of a tree; nodes are traversed level by level, where the root node is visited first, followed by its direct child nodes and their siblings, followed by its grandchild nodes and their siblings, etc., until all nodes in the tree have been traversed.
 

Attachments

Last edited:

Similar threads

Back
Top