Question: can someone answer h , i, and j only Consider the following tree data structure: a. Use the skeleton C/CH code discussed Moor USA HOME

can someone answer h , i, and j only
can someone answer h , i, and j only Consider the following
tree data structure: a. Use the skeleton C/CH code discussed Moor USA
HOME WW Dries Na Dreptos Gracia b. Write the code for visiting
the Tree nodes using a preorder traversal algorithm. c. Can you update

Consider the following tree data structure: a. Use the skeleton C/CH code discussed Moor USA HOME WW Dries Na Dreptos Gracia b. Write the code for visiting the Tree nodes using a preorder traversal algorithm. c. Can you update the preorder traversal function in part b to print the depth of each node visited? d. Write the code for visiting the tree nodes using a post order traversal algorithm. e. Assume that the tree represents a directory system. Add to the structure representing the tree node an integer member representing the number of files in each tree node. Update the tree implementation by reinitializing the tree nodes with a particular number of files as presented in the figure below: Root USR 18 HOME BIN 15 Esans www 7 Projects 15 Graders Man Drives Does 18 Dropbox OneDrive f. Use post order traversal to calculate the total number of files in the directory structure at the root node. Hint: While coding the post order traversal, you should sum the different number of files at the children nodes to come up with the total number of files when reaching the root node. g. Write the code to construct the binary search tree in the figure below: 7 5 14 6 10 16 15 h. Implement the search algorithm for a particular value in the tree. Search for the values 5, 7, 16, and 15. i. Visit the different binary search tree nodes using inorder traversal. j. Write the code to insert a new node into the binary search tree. Insert a couple of new nodes with values you select

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!