Question: Objective: Basic Operations of the Binary Search Trees Please Help me with this C++ project! I Appreciate it! Objective: Basic Operations of the Binary Search
Objective: Basic Operations of the Binary Search Trees
Please Help me with this C++ project! I Appreciate it!


Objective: Basic Operations of the Binary Search Trees Ynu are given two hinarv searrh trees. Tree1 and Tree? with the information as fnllows. Write a program to calculate the above results of Tree1 and Tree2. Obviously, Tree 1 and Tree 2 will have the same operations or functions such as inorder, postorder and preorder traversals, calculate the number of leaves and non-leaves, and determine if the tree is a full binary search tree. The most difference is the tree types, one is string and other is integer. For the string tree, make sure to read the lecture Ordering of the strings in a BST. For Tree1, insert the following strings in this given order: Michael, George, Tom, Adam, Jones, Peter, Daniel, April Suggest solution - Write an insert function to pre-insert the given strings to your source code. For Tree2, insert the following integers in this given order: 2,4,3,1,8,5,6,7 Suggest solution - Build an integer array with 8 elements to hold the given integers. Tree1 The number of nodes in Tree 1 is 8 Inorder traversal: Adam April Daniel George Jones Michael Peter Tom Postorder traversal: April Daniel Adam Jones George Peter Tom Michael Preorder traversal: Michael George Adam Daniel April Jones Tom Peter Number of non-leaves in Tree1: 5 (Michael George Tom Adam Daniel) Number of leaves in Tree1: 3 (April Jones Peter) Is Tree 1 a full binary tree? (yes =1 ): 0 ******** Tree 2 The number of nodes in Tree2 is 8 Inorder traversal: 12345678 Postorder traversal: 13765842 Preorder traversal: 21438567 Number of non-leaves in Tree2: 5 (2 4855 6) Number of leaves in Tree2: 3 (1 3 7) Is Tree2 a full binary tree? (yes =1 ): 0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
