2023 Create a class for a binary tree named BT Each node in the tree should have data | Assignment Collections
Computer Science 2023 Tree Traversal Assignment
2023 Create a class for a binary tree named BT Each node in the tree should have data | Assignment Collections
Create a class for a binary tree named BT. Each node in the tree should have data, a reference to the node’s left sub-tree, and a reference to the node’s right sub-tree. For the purposes of this project, the data in the nodes can be integers.
The binary tree should have a height property, a size property, which is the number of nodes in the tree, and the following methods:
- a null constructor
- a constructor that builds a tree from a specified array of integers. The tree does not need to be a balanced tree.
note: remember to address the height and size properties when building a tree from a specified array.
- preorder — iterate ( list all nodes in order according to the preorder traversal of the tree)
- inorder — iterate ( list all nodes in order according to the inorder traversal of the tree)
- postorder — iterate ( list all nodes in order according to the postorder traversal of the tree)
- search — given a key value, tell us whether or not the integer is in the tree.
- max — return the maximum value in the tree
- min — return the minimum value in the tree
- insert
- delete
- destroy
Test each method to ensure that it works properly.
We give our students 100% satisfaction with their assignments, which is one of the most important reasons students prefer us to other helpers. Our professional group and planners have more than ten years of rich experience. The only reason is that we have successfully helped more than 100000 students with their assignments on our inception days. Our expert group has more than 2200 professionals in different topics, and that is not all; we get more than 300 jobs every day more than 90% of the assignment get the conversion for payment.