Next - PowerPoint PPT Presentation

1 / 16
About This Presentation
Title:

Next

Description:

Next Home Singly Linked List Doubly Linked List Circular Linked List Type of Linked Lists Next ... Node Tail Node Deletion of a Node from Doubly Link List : ... – PowerPoint PPT presentation

Number of Views:114
Avg rating:3.0/5.0
Slides: 17
Provided by: ACCA150
Category:
Tags: doubly | link | linked | list | next

less

Transcript and Presenter's Notes

Title: Next


1
Subject Name Data Structure Using C Title
Linked Lists
Next
Home
2
Linked Lists
  • It consists of a sequence of nodes, each
    containing arbitrary data fields and one or two
    references ("links") pointing to the next and/or
    previous nodes. A linked list is a
    self-referential data type because it contains a
    pointer or link to another datum of the same
    type. Linked lists permit insertion and removal
    of nodes at any point in the list in constant
    time, but do not allow random access.
  • The principal benefit of a linked list over a
    conventional array is that the order of the
    linked items may be different from the order that
    the data items are stored in memory or on disk,
    allowing the list of items to be traversed in a
    different order.
  • Several different types of linked list exist
    Singly Linked List, Doubly Linked List, and
    Circular Linked List.

Next
Home
3
  • Hierarchical Structure of Linear List

Next
Home
4
  • There are basic FOUR operations performed on
    linear lists
  • Insertion of Nodes an insertion can be made at
    the any of the lists
  • Deletion of Nodes Deletion from general list
    requires that the list be searched for the data
    to be deleted.
  • Retrieval of Values List retrieval requires
    that data be located in a list and presented to
    the calling module without changing the contents
    of the lists.
  • Traversal in the List List traversal is a
    special case of retrieval in which all the
    elements are retrieved in a sequence.

Next
Home
5
Type of Linked Lists
  • Singly Linked List
  • Doubly Linked List
  • Circular Linked List

Next
Home
6
  • Singly Linked List

Arbitrary Address of the Node
100
300
400
200
700
Tail Node
Head Node
Address Part
Data Part
Next
Home
7
  • Insertion of a Node in Singular Link List
    Insert node value 45 after node value 9

100
300
700
400
200
(1)
600
Head Node
Tail Node
Insertable Node
100
300
700
400
200
(2)
600
Head Node
Tail Node
Inserted Node
Next
Home
8
  • Deletion of a Node in Singular Link List Delete
    node value 12

100
300
700
400
200
(1)
Head Node
Tail Node
100
300
700
400
200
(2)
Head Node
Tail Node
Next
Home
9
  • Doubly Linked List

Data Part
100
300
600
200
Tail Node
Head Node
Address Part
Next
Home
10
  • Insertion of a Node in Doubly Link List Insert
    node value 45 after node value 7

100
300
600
200
(1)
700
Head Node
Tail Node
Insertable Node
100
300
600
200
(2)
700
Head Node
Tail Node
Inserted Node
Next
Home
11
  • Deletion of a Node from Doubly Link List
    Delete node value 86

100
300
600
200
(1)
Head Node
Tail Node
100
300
600
200
(2)
Head Node
Tail Node
Next
Home
12
  • Circular Linked List

100
300
400
200
700
Tail Node
Head Node
Next
Home
13
  • Insertion of a Node in Circular Link List
    Insert node value 44 after node value 12

100
300
700
400
200
(1)
500
Tail Node
100
300
700
400
200
(2)
500
Tail Node
Next
Home
14
  • Deletion of a Node from Circular Link List
    Delete the node value 5

100
300
400
200
700
Tail Node
100
300
700
400
200
Tail Node
Next
Home
15
Application of Linked List
  • Large Numeric Arithmetic
  • Optimum Utilization of Memory Space
  • Represent Complex Structure Tree, Graph

Next
Home
16
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com