SlideShare a Scribd company logo
1 of 31
Powerpoint Templates
Page 1
Presentation Topic:
Singly Linked List &
Doubly Linked List
Group Members:
Mohaimin Rahat
Abdul Kahir
Shamim Sarkar
Md.Kamrul Hasan
Powerpoint Templates
Page 2
c
What are Linked Lists
• A linked list is a linear
data structure.
• Nodes make up linked
lists.
• Nodes are structures
made up of data and a
pointer to another node.
• Usually the pointer is
called next.
Powerpoint Templates
Page 3
c
Types of lists
• There are two basic types of linked list
• Singly Linked list
• Doubly linked list
Powerpoint Templates
Page 4
c
Singly Linked List
• Each node has only one link part
• Each link part contains the address of the
next node in the list
• Link part of the last node contains NULL
value which signifies the end of the node
Powerpoint Templates
Page 5
c
 Here is a singly-linked list (SLL):
a b c d
myList
• Each node contains a value(data) and a
pointer to the next node in the list
• MyList is the header pointer which
points at the first node in the list
Powerpoint Templates
Page 6
d
Basic Operations on a list
• Creating a List
• Inserting an element in a list
• Deleting an element from a list
• Searching a list
• Reversing a list
Powerpoint Templates
Page 7
Inserting the node in a SLL
There are 3 cases here:-
Insertion at the beginning
Insertion at the end
Insertion after a particular node
Powerpoint Templates
Page 8
d
Insertion at the beginning
There are two steps to be followed:-
a) Make the next pointer of the node point towards
the first node of the list
b) Make the start pointer point towards this new
node
 If the list is empty simply make the start pointer
point towards the new node;
Powerpoint Templates
Page 9
a
Powerpoint Templates
Page 10
a
Inserting at the end
Here we simply need to make the next pointer
of the last node point to the new node
Powerpoint Templates
Page 11
a
Inserting after an element
Here we again need to do 2 steps :-
 Make the next pointer of the node to be inserted
point to the next node of the node after which
you want to insert the node
 Make the next pointer of the node after which
the node is to be inserted, point to the node to
be inserted
Powerpoint Templates
Page 12
a
Powerpoint Templates
Page 13
a
Deleting a node in SLL
Here also we have three cases:-
 Deleting the first node
 Deleting the last node
 Deleting the intermediate node
Powerpoint Templates
Page 14
a
Deleting the first node
Here we apply 2 steps:-
 Making the start pointer point towards the 2nd node
 Deleting the first node using delete keyword
threetwoone
start
Powerpoint Templates
Page 15
a
Deleting the last node
Here we apply 2 steps:-
 Making the second last node’s next pointer point
to NULL
 Deleting the last node via delete keyword
node3node2node1
start
Powerpoint Templates
Page 16
a
Deleting a particular node
Here we make the next pointer of the node
previous to the node being deleted ,point to the
successor node of the node to be deleted and
then delete the node using delete keyword
node1 node2 node3
To be deleted
Powerpoint Templates
Page 17
d
Linked lists vs. Doubly linked lists
• Linked lists
– Simple implementation
– Require less memory
• Doubly linked lists
– More complex implementation
– Require more memory
– Accessing elements is easier, since accessing
from the “head” (i.e., leftmost element) costs as
much as accessing from the “tail” (i.e., rightmost
element)
Powerpoint Templates
Page 19
Definition
Doubly is a type of linked list that
allows us to go in both directions
and in a linked list.
Powerpoint Templates
Page 20
A node in a doubly linked list
stores two references:
- a next link, which points to the
next node in the list,
- a prev link, which points to the
previous node in the list.
Powerpoint Templates
Page 21
Such lists allow for :
a great variety of quick update
operations, including insertion and
removal at both ends, and in the
middle.
Powerpoint Templates
Page 22
Doubly linked lists
• A doubly linked list is a list that can be
traversed both from left to right and from right
to left
• It requires to store two head pointers:
– The first one points to the first element in the list
– The second one points to the last element in the
list
first
last
Powerpoint Templates
Page 23
Node definition
• Each node contains:
– The data
– A pointer to the previous element (left-side)
– A pointer to the next element (right-side)
previousPtr data nextPtr
Powerpoint Templates
Page 24
Structure of DLL
struct node
{
int data;
node*next;
node*previous; //holds the address of previous node
};
.Data .nextprevious.
inf
Powerpoint Templates
Page 25
NODE
A B
C
A doubly linked list contain three fields: an integer
value, the link to the next node, and the link to
the previous node.
previous data next
NULL 11 786
786200 400
200 656 400 786 777 NULL
Powerpoint Templates
Page 26
second last
Creating a doubly linked list
• We are going to create a doubly linked
list by hand:
first
Powerpoint Templates
Page 27
Doubly Linked Lists
Figure 3.14: A doubly linked list with sentinels, header and trailer,
marking the ends of the list. An empty list would have these sentinels
pointing to each other. We do not show the null prev pointer for the
header nor do we show the null next pointer for the trailer.
Powerpoint Templates
Page 28
Operation ID-Array Complexity Singly-linked list Complexity
Insert at beginning O(n) O(1)
Insert at end O(1) O(1) if the list has tail reference
O(n) if the list has no tail reference
Insert at middle O(n) O(n)
Delete at beginning O(n) O(1)
Delete at end O(1) O(n)
Delete at middle O(n):
O(1) access followed by O(n)
shift
O(n):
O(n) search, followed by O(1) delete
Search O(n) linear search
O(log n) Binary search
O(n)
Indexing: What is
the element at a
given position k?
O(1) O(n)
COMPLEXITY OF VARIOUS
OPERATIONS IN ARRAYS AND SLL
Deletion
Figure 3.15: Removing the node at the end of a a doubly linked list with
header and trailer sentinels: (a) before deleting at the tail; (b) deleting at
the tail; (c) after the deletion.
Insertion
Figure 3.16: Adding an element at the front: (a)
during; (b) after.
Powerpoint Templates
Page 31

More Related Content

What's hot

Tree in data structure
Tree in data structureTree in data structure
Tree in data structure
ghhgj jhgh
 

What's hot (20)

Singly link list
Singly link listSingly link list
Singly link list
 
Link list
Link listLink list
Link list
 
Linked list
Linked listLinked list
Linked list
 
Data Structure (Queue)
Data Structure (Queue)Data Structure (Queue)
Data Structure (Queue)
 
Circular link list.ppt
Circular link list.pptCircular link list.ppt
Circular link list.ppt
 
Tree in data structure
Tree in data structureTree in data structure
Tree in data structure
 
Linked list
Linked listLinked list
Linked list
 
Linked lists
Linked listsLinked lists
Linked lists
 
Linked List - Insertion & Deletion
Linked List - Insertion & DeletionLinked List - Insertion & Deletion
Linked List - Insertion & Deletion
 
Tree traversal techniques
Tree traversal techniquesTree traversal techniques
Tree traversal techniques
 
Linear data structure concepts
Linear data structure conceptsLinear data structure concepts
Linear data structure concepts
 
Linked List, Types of Linked LIst, Various Operations, Applications of Linked...
Linked List, Types of Linked LIst, Various Operations, Applications of Linked...Linked List, Types of Linked LIst, Various Operations, Applications of Linked...
Linked List, Types of Linked LIst, Various Operations, Applications of Linked...
 
Linked list in Data Structure and Algorithm
Linked list in Data Structure and Algorithm Linked list in Data Structure and Algorithm
Linked list in Data Structure and Algorithm
 
queue & its applications
queue & its applicationsqueue & its applications
queue & its applications
 
Introduction to data structure
Introduction to data structure Introduction to data structure
Introduction to data structure
 
Polynomial reppresentation using Linkedlist-Application of LL.pptx
Polynomial reppresentation using Linkedlist-Application of LL.pptxPolynomial reppresentation using Linkedlist-Application of LL.pptx
Polynomial reppresentation using Linkedlist-Application of LL.pptx
 
Binary Search Tree
Binary Search TreeBinary Search Tree
Binary Search Tree
 
Linked List
Linked ListLinked List
Linked List
 
Queues
QueuesQueues
Queues
 
Tree
TreeTree
Tree
 

Viewers also liked

Array implementation and linked list as datat structure
Array implementation and linked list as datat structureArray implementation and linked list as datat structure
Array implementation and linked list as datat structure
Tushar Aneyrao
 
Circular linked list
Circular linked listCircular linked list
Circular linked list
dchuynh
 

Viewers also liked (20)

Linked list without animation
Linked list without animationLinked list without animation
Linked list without animation
 
linked list
linked list linked list
linked list
 
Linked list
Linked listLinked list
Linked list
 
Link List
Link ListLink List
Link List
 
Link list
Link listLink list
Link list
 
Linked List data structure
Linked List data structureLinked List data structure
Linked List data structure
 
Linked lists
Linked listsLinked lists
Linked lists
 
Array implementation and linked list as datat structure
Array implementation and linked list as datat structureArray implementation and linked list as datat structure
Array implementation and linked list as datat structure
 
Data structures and algorithms
Data structures and algorithmsData structures and algorithms
Data structures and algorithms
 
Dynamic data structures
Dynamic data structuresDynamic data structures
Dynamic data structures
 
Circular linked list
Circular linked listCircular linked list
Circular linked list
 
DATA STRUCTURES
DATA STRUCTURESDATA STRUCTURES
DATA STRUCTURES
 
Data structures
Data structuresData structures
Data structures
 
Link list CSE ( Data structure ) .
Link list CSE  ( Data structure ) .Link list CSE  ( Data structure ) .
Link list CSE ( Data structure ) .
 
Linked List
Linked ListLinked List
Linked List
 
Singly linked lists
Singly linked listsSingly linked lists
Singly linked lists
 
Car Parking System (Singly linked list )
Car Parking System (Singly linked list ) Car Parking System (Singly linked list )
Car Parking System (Singly linked list )
 
LINKED LISTS
LINKED LISTSLINKED LISTS
LINKED LISTS
 
2CPP17 - File IO
2CPP17 - File IO2CPP17 - File IO
2CPP17 - File IO
 
File Handling In C++(OOPs))
File Handling In C++(OOPs))File Handling In C++(OOPs))
File Handling In C++(OOPs))
 

Similar to linked list

Similar to linked list (20)

Linked list.pptx
Linked list.pptxLinked list.pptx
Linked list.pptx
 
Doubly linked list
Doubly linked listDoubly linked list
Doubly linked list
 
Linked list
Linked listLinked list
Linked list
 
Unit 1 linked list
Unit 1 linked listUnit 1 linked list
Unit 1 linked list
 
csc211_lecture_21.pptx
csc211_lecture_21.pptxcsc211_lecture_21.pptx
csc211_lecture_21.pptx
 
linked list using c
linked list using clinked list using c
linked list using c
 
data structures and applications power p
data structures and applications power pdata structures and applications power p
data structures and applications power p
 
Linkedlist
LinkedlistLinkedlist
Linkedlist
 
Linked list
Linked listLinked list
Linked list
 
Double link list
Double link listDouble link list
Double link list
 
Linked Lists.pdf
Linked Lists.pdfLinked Lists.pdf
Linked Lists.pdf
 
Data Structures- Part7 linked lists
Data Structures- Part7 linked listsData Structures- Part7 linked lists
Data Structures- Part7 linked lists
 
1.3 Linked List.pptx
1.3 Linked List.pptx1.3 Linked List.pptx
1.3 Linked List.pptx
 
Linked list (1).pptx
Linked list (1).pptxLinked list (1).pptx
Linked list (1).pptx
 
Operations on linked list
Operations on linked listOperations on linked list
Operations on linked list
 
Linked list
Linked listLinked list
Linked list
 
ds-lecture-4-171012041008 (1).pdf
ds-lecture-4-171012041008 (1).pdfds-lecture-4-171012041008 (1).pdf
ds-lecture-4-171012041008 (1).pdf
 
Data Structures(Part 1)
Data Structures(Part 1)Data Structures(Part 1)
Data Structures(Part 1)
 
LinkedList Presentation.pptx
LinkedList Presentation.pptxLinkedList Presentation.pptx
LinkedList Presentation.pptx
 
Linked List
Linked ListLinked List
Linked List
 

Recently uploaded

Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
Tonystark477637
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Christo Ananth
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Dr.Costas Sachpazis
 

Recently uploaded (20)

University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLPVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 

linked list

  • 1. Powerpoint Templates Page 1 Presentation Topic: Singly Linked List & Doubly Linked List Group Members: Mohaimin Rahat Abdul Kahir Shamim Sarkar Md.Kamrul Hasan
  • 2. Powerpoint Templates Page 2 c What are Linked Lists • A linked list is a linear data structure. • Nodes make up linked lists. • Nodes are structures made up of data and a pointer to another node. • Usually the pointer is called next.
  • 3. Powerpoint Templates Page 3 c Types of lists • There are two basic types of linked list • Singly Linked list • Doubly linked list
  • 4. Powerpoint Templates Page 4 c Singly Linked List • Each node has only one link part • Each link part contains the address of the next node in the list • Link part of the last node contains NULL value which signifies the end of the node
  • 5. Powerpoint Templates Page 5 c  Here is a singly-linked list (SLL): a b c d myList • Each node contains a value(data) and a pointer to the next node in the list • MyList is the header pointer which points at the first node in the list
  • 6. Powerpoint Templates Page 6 d Basic Operations on a list • Creating a List • Inserting an element in a list • Deleting an element from a list • Searching a list • Reversing a list
  • 7. Powerpoint Templates Page 7 Inserting the node in a SLL There are 3 cases here:- Insertion at the beginning Insertion at the end Insertion after a particular node
  • 8. Powerpoint Templates Page 8 d Insertion at the beginning There are two steps to be followed:- a) Make the next pointer of the node point towards the first node of the list b) Make the start pointer point towards this new node  If the list is empty simply make the start pointer point towards the new node;
  • 10. Powerpoint Templates Page 10 a Inserting at the end Here we simply need to make the next pointer of the last node point to the new node
  • 11. Powerpoint Templates Page 11 a Inserting after an element Here we again need to do 2 steps :-  Make the next pointer of the node to be inserted point to the next node of the node after which you want to insert the node  Make the next pointer of the node after which the node is to be inserted, point to the node to be inserted
  • 13. Powerpoint Templates Page 13 a Deleting a node in SLL Here also we have three cases:-  Deleting the first node  Deleting the last node  Deleting the intermediate node
  • 14. Powerpoint Templates Page 14 a Deleting the first node Here we apply 2 steps:-  Making the start pointer point towards the 2nd node  Deleting the first node using delete keyword threetwoone start
  • 15. Powerpoint Templates Page 15 a Deleting the last node Here we apply 2 steps:-  Making the second last node’s next pointer point to NULL  Deleting the last node via delete keyword node3node2node1 start
  • 16. Powerpoint Templates Page 16 a Deleting a particular node Here we make the next pointer of the node previous to the node being deleted ,point to the successor node of the node to be deleted and then delete the node using delete keyword node1 node2 node3 To be deleted
  • 17. Powerpoint Templates Page 17 d Linked lists vs. Doubly linked lists • Linked lists – Simple implementation – Require less memory • Doubly linked lists – More complex implementation – Require more memory – Accessing elements is easier, since accessing from the “head” (i.e., leftmost element) costs as much as accessing from the “tail” (i.e., rightmost element)
  • 18.
  • 19. Powerpoint Templates Page 19 Definition Doubly is a type of linked list that allows us to go in both directions and in a linked list.
  • 20. Powerpoint Templates Page 20 A node in a doubly linked list stores two references: - a next link, which points to the next node in the list, - a prev link, which points to the previous node in the list.
  • 21. Powerpoint Templates Page 21 Such lists allow for : a great variety of quick update operations, including insertion and removal at both ends, and in the middle.
  • 22. Powerpoint Templates Page 22 Doubly linked lists • A doubly linked list is a list that can be traversed both from left to right and from right to left • It requires to store two head pointers: – The first one points to the first element in the list – The second one points to the last element in the list first last
  • 23. Powerpoint Templates Page 23 Node definition • Each node contains: – The data – A pointer to the previous element (left-side) – A pointer to the next element (right-side) previousPtr data nextPtr
  • 24. Powerpoint Templates Page 24 Structure of DLL struct node { int data; node*next; node*previous; //holds the address of previous node }; .Data .nextprevious. inf
  • 25. Powerpoint Templates Page 25 NODE A B C A doubly linked list contain three fields: an integer value, the link to the next node, and the link to the previous node. previous data next NULL 11 786 786200 400 200 656 400 786 777 NULL
  • 26. Powerpoint Templates Page 26 second last Creating a doubly linked list • We are going to create a doubly linked list by hand: first
  • 27. Powerpoint Templates Page 27 Doubly Linked Lists Figure 3.14: A doubly linked list with sentinels, header and trailer, marking the ends of the list. An empty list would have these sentinels pointing to each other. We do not show the null prev pointer for the header nor do we show the null next pointer for the trailer.
  • 28. Powerpoint Templates Page 28 Operation ID-Array Complexity Singly-linked list Complexity Insert at beginning O(n) O(1) Insert at end O(1) O(1) if the list has tail reference O(n) if the list has no tail reference Insert at middle O(n) O(n) Delete at beginning O(n) O(1) Delete at end O(1) O(n) Delete at middle O(n): O(1) access followed by O(n) shift O(n): O(n) search, followed by O(1) delete Search O(n) linear search O(log n) Binary search O(n) Indexing: What is the element at a given position k? O(1) O(n) COMPLEXITY OF VARIOUS OPERATIONS IN ARRAYS AND SLL
  • 29. Deletion Figure 3.15: Removing the node at the end of a a doubly linked list with header and trailer sentinels: (a) before deleting at the tail; (b) deleting at the tail; (c) after the deletion.
  • 30. Insertion Figure 3.16: Adding an element at the front: (a) during; (b) after.