Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

SOMEONE PLEASE HELP Suppose you are given a list of students registered in a course and you are required to implement BST of student. Each

SOMEONE PLEASE HELP

Suppose you are given a list of students registered in a course and you are required to implement BST of student. Each student in the list has name, regNo and cGpa. You are also required to implement following function (Use this>>>>>>>>> Suppose you are given a list of students registered in a course and you are required to implement BST of student. Each student in the list has name, regNo and cGpa. You are also required to implement following functions.

int BSTheight(Node*) // takes roots as an argument and returns height of the tree

bool completeBST(Node *) // takes roots as an argument and returns true if BST is complete tree and false if its not complete

bool perfectBST(Node *) // takes toots as an argument and returns true if BST is a perfect tree and false if its not perfect. >>>>>>>>>>>>>>>>>>>>AND ADD THE FOLLOWING FUNCTION ON IT)

treeType(Node *) // When root node of a data structure is passed it checks following things

Is it a Tree?

Is it a Binary Tree?

Is it a BST?

The output will be the specific type of tree which is passed in the function.

For example

image text in transcribed
1 87% 1:28 pm Projectt - Unsaved H . . . 2 10 Tree 1 5 11 The output if root node of this tree is passed in the function will be, it's a Tree Tree 2 4 The output if root node of this tree is passed in the function will be it's a Binary Tree 8 Tree 3 13 The output if root node of this tree is passed in the function will be , it's a Binary Search Tree Figure 4 The output if root node of this structure is passed in the function will be , it's NOT a Tree B I UDA=

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions