Question
Write a C program to implement the BST (Binary Search Tree) by using Link list. Following methods of BST are included a) Insert b) Search
Write a C 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.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started