Question: Implement a tree using a doubly linked list. Each node in the linked list would be of type struct/class and has the following declaration: struct/class
Implement a tree using a doubly linked list. Each node in the linked list would be of type struct/class and has the following declaration:
struct/class Student { Student * left; Student * right; int marks; string name; };
You have to implement the following functions for the tree: 1) Insert This function will add a new student within the tree structure. Ask the user for student name and marks. 2) Display This function will print data of all students in the tree structure (use any traversal method). 3)Sorting This function will sort the students within the tree structure based on marks.
NOTE:DO IN C++
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
