09-04-2014, 03:16 PM
Data Structures using C
Data Structures .pdf (Size: 609.52 KB / Downloads: 18)
What is a Linked List?
A linked list is a data structure which is collection of zero or
more nodes where each node has some information between each node in
the list, there exist a logical relationship so that given the
address of first node, any node in that list can be obtained.
Each node can hold the data along with a pointer field using which
address of the next node can be obtained.
Insert a Node at the Rear End:-
To insert node temp at the rear end of the list, the address of
last node of the existing list should be obtained.
This can be achieved by using an auxiliary pointer variable
„cur‟.
Initially „cur‟ points to the first node in the list.
Update the „cur‟ pointer, to point, to its successor nodes one
after the other, until address of the last node is obtained.
This can be achieved using the statement.