Question
Please use C++, and must meet all of the grading criteria. Thank You! Summary The structure of a tree can itself be information with which
Please use C++, and must meet all of the grading criteria. Thank You!
Summary
The structure of a tree can itself be information with which to associate data that it stores. This is typically in the form of hierarchical data, but it can also be thought of as a subtree having more in common than another subtree in another part of the tree. Explore various ways of doing tree traversals on a set of data stored by your own implementation of a tree.
Skills Expected
-
Linked Structures
-
Tree ADT
-
Tree Traversals
Assignment Description
Create a binary tree data structure used to keep track of data (e.g. an int). Explore Pre-, Post-, and In- Order traversal as well as breadth-first search.
Grading Criteria
Implementation o [3 Points] Binary Tree (Doesnt have to be sorted) data structure o [5 Points] Pre-Order Traversal o [5 Points] Post-Order Traversal o [5 Points] In-Order Traversal o [5 Points] Breadth-First Search
Demonstration o Three different trees to traverse (containing at least 10 items each)
[1 Point] A left-unbalanced tree to traverse
[1 Point] A right-unbalanced tree to traverse
[1 Point] A symmetrical tree to traverse
o On each of the three different trees to traverse, demonstrate:
[1 Point] Pre-Order Traversal [1 Point] Post-Order Traversal [1 Point] In-Order Traversal
[1 Point] Breadth-First Search
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