Circular Header Link List

Download Report

Transcript Circular Header Link List

Link List
Submitted by
Mukesh (5765)
Vijender(5755)
BCA 2nd Year
Submitted to
Er .Dheeraj Maam
Lect. In Comp. sc.
Overview
1
Definition
2
Header Link List
3
Circular Link List
4
Two-Way Link List
Definition

A Linked List is a list of elements, or nodes,
that are linked to one another such that each
element references the next. Linked lists and
arrays are similar since they both store
collections of data, however an array has a fixed
size, at least in most commonly used languages;
where as a linked list as an arbitrary length,
which allows the list to grow and shrink as
needed by the client.
1
A
B
C
D
Header Link List
A header linked list is a linked list which
always contains a special node, called the
header node, at the beginning of the list.
Header
Node
1
The following are two kinds of widely used
header lists:
Grounded Header Link List
Circular Header Link List
4
LOGO
Grounded Header Link List
A grounded header list is a header list where
the last node contains the null pointer. (The
term “grounded” comes from the fact that many
texts use the electrical ground symbol to
indicate the null pointer.)
Start
Header
Node
1
Circular Header Link List
A circular header Link list is a header
list where the last node points back to
the header bode. The chains do not
indicate the last node and first node
of the link list. In this case, external
pointers provide a frame reference
because last node of a circular link list
does not contain null pointer.
Circular header link list
7
LOGO
Circular Link List
A linked list whose last node points
back to the first node instead of
containing the null pointer, called a
circular list. In a circular link list “next”
pointer field of last node store the
address of the first node.
8
LOGO
Circular Linked Lists
9
LOGO
Two way link list
 A two-way list is a linear collection of data
elements, called nodes, where each node N is
divided into three parts:
 An information field INFO which contains the
data of N
 A pointer field FORW which contains the
location of the next node in the list.
 A pointer field BACK which contains the
location of the preceding node in the list
Two Way List
11
LOGO
Thank you from
(Mukesh Kumar )
Thank you from
(Vijender Kumar)
LOGO