EXPERIMENT 5 DOUBLY LINKED LISTS
1.
2.
3.
4.
Objectives:
(a). Understanding the concepts and operations of doubly linked lists
(b). Implement doubly linked list using dynamic structures
Time Required: 3 hrs
Software Required:
(a). Windows OS
(b). Microsof
DATA STRUCTURES
Lecture 03
Compiled by Zainab Javed
2
Stack Data Structure
A Stack is a list in which all insertions and deletions take
place at one end, called the Top.
3
Basic Operations
push(e): Insert element e at the top of the stack
pop(): Remove t
DATA STRUCTURES
Lecture 02
Compiled by Zainab Javed
Hadith
The Prophet PBUH said:
I guarantee a house in the middle of Jannah for the one
who abandons lying even for the sake of fun
[Abu-Dawud]
Lab 2 Contents
Arrays
Pointers
Array Data Structure
An ord
Data Structures
Lecture 1,2,3
FURC
Dr. Imran Daud
Course Contents
Overview, Introductory concepts
Data Types, meaning and implementation
Abstract data types
Arrays (revisited)
Structures
Stacks (recursion)
Queues
Linked Lists
FURC
Dr. Imran Daud
Course Co
Data Structures
Stacks
Lecture 5,6
FURC
Dr. Imran Daud
Stack in Problem Solving
Consider a mathematical expression that includes several
sets of nested parenthesis, e.g
( x + (y (a +b) )
We want to ensure that parenthesis are nested correctly and
the expr
Data Structures
Stacks
Lecture 4
FURC
Dr. Imran Daud
The Stack: Definition
A stack is an ordered collection of items into which
new items may be inserted and from which items may
be deleted at one end called the TOP of the stack
FURC
Dr. Imran Daud
Stack
Data Structures
Recursion
Lecture 7,8,9
FURC
Dr. Imran Daud
What is Recursion?
A procedure that is defined in terms of itself
A recursive call is a function call in which the
called function is the same as the one making
the call.
In a computer languag
EXPERIMENT 4 SINGLY LINKED LISTS
1.
2.
3.
4.
Objectives:
(a). Understand the concepts of singly linked lists
(b). Implement singly linked list using dynamic structures
Time Required: 3 hrs
Software Required:
(a) Microsoft Windows
(b) Microsoft Visual Stud
Data Structures
Lecture 04 - Queues
Complied by Zainab Javed
2
Hadith
The Prophet (PBUH) said:
Allah is pleased with a person who eats some food and
then praises Him for it, or who drinks some drink and then
praises Him for it.
[Muslim]
3
Queue Data Struc