Presentation Linked List
Presentation Linked List
(CS301)
Data Next
1000
Insert a node
with value ‘2’
in existing list
Graphical Representation of Linked List
1000
2 3000
6 5000
8 2000
7 6000
1 Size =
8000 1000 3000 5000 2000 6000 5
1. Node Class
2. List class
public:
Student() // Constructor
{
Rollno="";
NextStudent=NULL;
}
StudentList::StudentList() // Constructor
{
HeadStudent
HeadStudent->SetNextStudent(NULL);
8000
Task 2:
Add traverse (display) function to display roll number
of students.
Task3:
Add more attributes (name, GPA, semester etc) in
student class and make changes in your code
accordingly.