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
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