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
Get step-by-step solutions from verified subject matter experts
