[SOLVED] CSE220 Lab 8- Trees and Graphs

25.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon Lab08-gr4pzx.zip (375.5 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
🔒 Securely Powered by:
Secure Checkout
5/5 - (2 votes)

NB: All the methods(1-7) as well as the main method/tester statements must be written in one class. DO NOT write a different class for each method.
Compile all your codes and simulation picture in ONE PDF and submit it .

1. RECURSIVELY calculate the height of a tree.
2. RECURSIVELY calculate the level of a Node in a tree.
3. Print elements of all the Nodes of a tree using Pre-order Traversal.
4. Print elements of all the Nodes of a tree using In-order Traversal.
5. Print elements of all the Nodes of a tree using Post-order Traversal.
6. Write a method which will evaluate whether two trees are exactly same or not.
7. Write a method which will return a copy (new tree) of a given tree.
8. An adjacency matrix is given below:
A B C D E F G
A 0 1 0 1 1 0 0
B 0 0 0 0 0 0 1
C 0 1 0 0 0 0 0
D 0 0 1 0 0 0 1
E 0 0 0 0 0 0 0
F 0 0 0 1 0 0 0
G 0 0 0 0 1 1 0

a) Draw the equivalent graph.

See the pages 94~98 of “all-notes.pdf”

  • Lab08-gr4pzx.zip