Question: 6. (10%) For a binary tree, (a) (6%) Describe the methods to store and traverse a binary tree using (1) array, and (2) structure with

 6. (10%) For a binary tree, (a) (6%) Describe the methods

6. (10%) For a binary tree, (a) (6%) Describe the methods to store and traverse a binary tree using (1) array, and (2) structure with pointers. (b) (4%) If a binary tree has L levels (the root is at level 1 and so on) and N nodes, the data in each tree node takes A bytes to store, and a pointer takes B bytes to store. Provide an analysis on under which circumstances that storing a binary tree in an array uses less memory than storing it in a structure with pointers

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!