Friday, August 29, 2008

Linked List

There are three basic kinds of linked list: singly-linked lists, doubly-linked lists and circularly-linked lists. The singly-linked lists is in first figure and doubly-linked lists is in second figure is below.

Declaration:

typedef struct ListElement

{

struct ListElement *next;

int data;

} ListElement;

typedef struct DoublyLinkedList

{

struct DoublyLinkedList *next;

struct DoublyLinkedList *prev;

int data;

} DoublyLinkedList;

No comments: