Question

Binary tree please answer these two question properly about binary tree Q(1) What are their respective...

Binary tree please answer these two question properly about binary tree

Q(1) What are their respective logical and physical / storage structures .Q(2) At least one application example combining data structure and algorithm should be given.

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

1.

The logical structure of a binary includes 3 parts :

  • Data part.
  • Left child pointer.
  • Right child pointer.

There are 2 ways to represent a binary tree in physical memory :

  • Array representation.
  • Linked representation.

2. An application which involves the binary tree data structure is displaying the list of all files inside a folder.

The algorithm in which the contents of a folder are displayed in postorder traversal is :

t = folder -> data;

Display( struct node folder )

{

Display(folder -> next);

Display(folder -> next);

if(folder -> data != t )

{

Display folder -> data;

}

}

Add a comment
Know the answer?
Add Answer to:
Binary tree please answer these two question properly about binary tree Q(1) What are their respective...
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