Question

Data Structures and Algorithm: Trees

Given the tree: F B А D E H Get the prefix of a tree. BFADCEGIH FDABCEGIH HIGECDABF FBADCEGIH

Which of the choices is correct?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Here we are briefly discuss about finding prefix for any given tree

Prefix:

     You just come from the root node and visit every node from left to right as shown in below figure. First visit of a node is always indicates as Prefix order of given tree.

I explained clearly in below figures.

Given tree 2020/7/31 17:26 easy Explanation :- we can find Prefix, infix and postfix based on tree. You just come from the ro

there we want prefix; Now node 202077/31 17:27 → Here lindicates first visit of a node You just write down & sequence order

Hence our Answer is:    FBADCEGIH (4th option)

If it's really helpful please hit LIKE...

Thank You...

Add a comment
Know the answer?
Add Answer to:
Data Structures and Algorithm: Trees Which of the choices is correct? Given the tree: F B...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT