Question: Write a program to implement the BST (Binary Search Tree) by using Link list. Following methods of BST are included a) Insert b) Search c)

Write a program to implement the BST (Binary Search Tree) by using Link list. Following methods of BST are included

a) Insert

b) Search

c) Ascending order printing of student records , which traversal mechanism will you be using.

Your binary search tree will store following information of a student

typedef struct

{

int id;

char name[MAX_NAME_LEN];

float gpa;

} STUDENT;

typedef struct node

{

STUDENT* dataPtr;

struct node* left;

struct node* right;

} NODE;

Your BSt should be sorted by name initially, create a function ReArrange(int type) which will re arrange the BST to be stored in order of GPA or ID.

using C++ only .

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!