Question
Problem 6 ( 135 points) 6.1 Write a program to store and display a tree. You may limit the type of trees that it will
Problem 6 ( 135 points)
6.1 Write a program to store and display a tree. You may limit the type of trees that it will process, e.g. complete binary trees, or heaps. You may choose the data structures to store and process the tree, e.g. an array. In your test program, be sure to print the node values in tree format.
6.2 Write a function to add an element to an existing tree.
6.3 Write a function to delete an element from an existing tree.
6.4 Write a function to perform an in-order traversal on an existing tree.
6.5 Write a function to perform an pre-order traversal on an existing tree.
6.6 Write a function to perform an post-order traversal on an existing tree.
6.7 Write a function to perform an level-order traversal on an existing tree.
6.8 Write a function to find the children of a specified node.
6.9 Write a function to find the parent of a specified node.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started