Beruflich Dokumente
Kultur Dokumente
Announcements
Last date for course drop is 20th October. p
I will sign drop requests till 19th October.
Lec-27
Recap
Typedef yp Self referential structures Linked list
Lec-27
Lec-27
Lec-27
Advantages:
Asks for only as much memory allocation as needed during any stage of the execution Provides flexibility in inserting and deleting elements by just re-arranging the links
Disadvantage:
Accessing a particular element (searching) is not easy
Lec-27
Lec-27
Linked List
struct node { int info; struct node };
// An empty list
Lec-27
Lec-27
Notice that this and the previous cases are actually same p y
Lec-27
Finally t2 is pointing to the last node. Now set the next pointer of t2 to be t1.
Lec-27
11
Lec-27
13
// move the head of the list to the next node // temp can be freed return memory to system // the new list is the new head of the list
Any Questions?
Lec-27
16