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

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!