DSA Lab Session 6
DSA Lab Session 6
Objective
Pre-lab Exercise
cout<<head->data<<endl;
cout<<tail->data<<endl;
head=head->next;
tail=tail->previous;
cout<<head->data<<endl;
cout<<tail->data<<endl;
1|Page
4. Create an empty doubly linked list having Employee structure name and the
following attribute: name, salary and age
Post-lab Exercise
1. What are the advantages and disadvantages of a doubly linked list over a
singly linked list?
2. What three things does the node of a doubly linked list have to store?
2|Page