Data Structures
Unit# 4
Lecture 6
Queues
Unit 4
Definitions
A queue is a linear abstract data type such that
insertions are made at one end, called the rear, and
removals are made at the other end, called the front.
Queues are sometimes called FIFOs: firs

Data Structures
Unit# 5
Lecture 7
Linked Lists
Linked Lists
A linked list consists of:
A sequence of nodes
Each node contains a value and a link (pointer
or reference) to some other node
The last node contains a null link
The list may (or may not) have a

Data Structures
Lecture 2
Junaid Azhar
junaid.azhar@gmail.com
Arrays
Array is a data structure that represents a collection
of the same types of data
Data structures
Related data items of same type
Remain same size once created
Fixed-length entries unless

Data Structures
Lecture 1
Junaid Azhar
junaid.azhar@gmail.com
Data Structures
Data
Are simply values or set of values
Raw form
E.g. 28, John etc.
Information
Meaningful data or processed data is
known as information
Data Structures Cont.
Data may be organ

Data Structures
Unit# 3
Lecture 4
Introduction
For a poker game; on any turn, a player may discard
a single card from his hand to the top of the pile, or he
may retrieve the top card from the discard pile
Is there an appropriate data type to model this
di

Data Structures
Unit# 3
Lecture 3
Algebraic Expression
An algebraic expression is a legal combination of
operands and the operators.
Operand is the quantity (unit of data) on which a
mathematical operation is performed.
Operand may be a variable like x, y

Data Structures
Lecture 5
Timing Complexity
Time complexity of an algorithm signifies the total
time required by the program to run to completion.
The time complexity of algorithms is most
commonly expressed using the big O notation.
Time Complexity is es