Question: Please answer them in C++. Write a program which takes in a complete proper binary tree . Your program will check if the inputted tree

Please answer them in C++. Write a program which takes in acomplete proper binary tree. Your program will check if the inputted tree is abinary search tree. If it is your program must output TRUE or FALSE otherwise.

Just as in the lab on trees, the tree will be inputted into the computer layer-by-layer starting at the root. Input it terminated with -1.

Input:

1

2

3

4

5

6

-1

Output: FALSE

Input:

9

5

15

1

8

12

-1

Output: TRUE

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!