A Journey 2 Eternity

Linked List

Posted on: August 29, 2008

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

Singly-Linked Lists

Singly-Linked Lists

Doubly-Linked Lists

Doubly-Linked Lists

Declaration:

typedef struct ListElement
{
	struct ListElement *next;
	int data;
} ListElement;

typedef struct DoublyLinkedList
{
	struct DoublyLinkedList *next;
	struct DoublyLinkedList *prev;

	int data;
} DoublyLinkedList;
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Pages

Categories

August 2008
M T W T F S S
« Apr   Sep »
 123
45678910
11121314151617
18192021222324
25262728293031

Blog Stats

  • 27,176 hits
%d bloggers like this: