Вы находитесь на странице: 1из 4

Data Structure:

A collection of data elements, whose arrangements is characterized, by


accessing function that are used to store and retrieve individual data elements called
data structure.

APPLICATION OF DS:

Some of the applications of data structures are

*Operating Systems.

Compiler design.

Statistical and Numerical analysis

Data Base management systems.

Experts Systems

Network analysis.

LINKED LIST IMPLEMENTATION:

A Linked List is Dynamic data structures the data are stored in memory location by
pointer is called Linked List

A Linked list is a structure that leads to algorithm that minimize data movement are
insertions and deletions Occur in an ordered list (element).

• Each Node contains two fields:

• Data (element)

• Next (address of the next node)

• The last cell’s next pointer points to NULL.

Structure of a node:

Data Field

Data field:

Data field contain the data to store in the memory.

Address field:

Address field contains the address of the next node; It is otherwise called pointer
(or) Linked field.

Advantages:
• Insertion and deletion are done easily in the linked list.

• Time will be consumed Using linked list.

• It reduces the wastage of the memory spaces.

• Linked list are implement in most Common language like C, C++ , Java.

• Type of Linked list:

There are different type of linked list are as follows.

• Singly Linked list

• Doubly Linked list

• Circular linked list.

Singly linked list:

It is the Combination of nodes, each node have a data in data field and address of
the next node in address field or null value if it is final node.

Header

10 20 30 40

500 700 1000 800

Fig: Linked list with a header

DOUBLY LINKED LIST:

A Doubly linked list is a linked list in which each node has three fields namely data
field, forward link (F LINK) and Backward Link (B LINK). F LINK points to the
successor node in the list where as B LINK points to the predecessor node.

BLINK DATA ELEMENT F LINK

Fig NODE IN DOUBLY LINKED LIST.

Advantage:

• Deletion Operation is easier.


• Finding the predecessor and successor of a node is easier

Disadvantage:

• More Memory space is required since it has tow pointers.

Circular Linked list:

In circular linked list the pointer of the last node points to the first node. So that
the next field in the last node contains a pointer back to the first node rather than
the null pointer.

Circular linked list can he implemented as.

• Singly linked circular list

• Doubly liked circular list

Singly linked circular list:

A Singly linked circular list is a linked list in which the list node of the list points to
the first node.

Doubly Linked Circular List:

A doubly linked circular list is a doubly linked list in which the forward link of the
last node points to the first node and backward link of the first node points to the
last node of the list

Advantage of circular linked list:

• It allows traversing the list starting at any point.

• It allows quick access to the first and Last records.

• Circularly doubly linked list allow to traverse the list in either direction

• Accessing a node is easy

Disadvantage of circular linked list:

• Possible to get into an infinite loop.

• Identifying the first/last node is important. This can be done by done using
header.

• The list should not be empty.

Application of linked list:

• Sorting
• Tree traversals

• Polynomials ADT Radix Sort

• Multi list

Вам также может понравиться