CONTENTS
C
O
N
T
E
N
T
S
ARRAY
1
STACK
2
QUEUE
3
LINKED LIST
4
01 ARRAY
01 02 03
A R R AY
INTRODUCTION
TO ARRAY
Array is vital part of
programming. It
allows user to stored
multiple value in
single variable.
For example an
array may contains
all integer or
character elements,
but not both. Each
array can be
accesed by using
array index and its
is must be poitive
integer value
This is starts from
the numerical
value 0 and ends
at 1 less thanof the
array index value.
For example an
array[n] containing
n number of
elements are
denoted by 0’s and
1’s is called array.
A R R AY
ARRAY OPERATIONS
T y p e s o f A r r a y s
One dimensional array
01
Two dimensional array
02
Multi dimensional
array
03
One dimensional array
One dimensional array is also
caled as linear array. It is also
represents 1-D array. The
one dimensional array stores
the data elements in a single
row and column.
01
Two dimensional array
02
Multi dimensional array
An array haves 2 or more subscripts, that type of
array is called multi dimensional array, Each
element of a3-D array id accessed using
subscripts, one for each information.
03
A R R AY
TYPES OF
ARRAY
A two dimensional array is
a collection of elements
placed in rows and
columns.
The syntax used to declare
two dimensional array
includes two subcripts, of
which one specifies the
number of rows and the
other specifies the number
of columns.
02 STACK
S TA C K
WHAT IS STACK? Representate of Stacks
S TA C K
 ([]({()}[())]) is not a simple counting is
not enough to check balance.
 You can do it with a stack: going left
to right,
• If you see a (, [, or {, push it on the
stack.
• If you see a ), ], or }, pop the stack
and check wheather you got the
corresponding (, [, or {
Checking For Balanced
Braces
PUSH
PEEK POP
PUSH
Adds the object to the top of the
stack.
POP
Removes the object at the top
of the stack and returns it.
PEEK.
STACK
OPERATI
ONS
S TA C K
Returns the top object of the
stack but does not remove it
from the stack
03 QUEUE
Front
It is a variable which refers to
first position in queue.
01
Rear
It is a variable which refers to
last position in queue.
02
Element
It is a data component.
03
MaxQueue
It is a variable thatdescribes
maximum number of eements in
a queue.
04
C o m p o n e n t s o f Q u e u e
Q U E U E
Queue is data structure
whose its element can be
added in the last element
and taken only from the first
element.
Known as FIFO (First In
First Out).
DEFINITION
S TA C K
OPERATIONS
04 LINKED LIST
L I N K E D L I S T
INTRODUCTION
Linked list is a linear data
structure .It contains nodes.
Each node contains two
parts,
01 i.e. DATA part and LINK part.
The data contains elements and
Link cointains adress of another
node.
02
LIMITATION OF ARRAY
L I N K E D L I S T
SINGLY LINKED LIST
 Linked list is a collection of similar elements.
 Each elements points to the necxt element.
 Linked list i a linear list orf specially
designed nodes, where each node divided
into two parts.
INFO FIELD NEXT FIELD
 Info field: it contains necessary
information about the item of the list to be
stored and processed.
 Next field: it contains adress of the
next node. This field is used to access
the next data item in other.
Suppose a stack is to be implemented using
a linked list instead of an array. What would
be the effect on the time complexity of the
push and pop operations of the implemented
using linked list(Assuming stack is
implemented efficiency)?
Mention for which header list, you will found the
last node contains the null pointer?
Q U E S T I O N S
THANK YOU

Data structure

  • 2.
  • 3.
  • 4.
    01 02 03 AR R AY INTRODUCTION TO ARRAY Array is vital part of programming. It allows user to stored multiple value in single variable. For example an array may contains all integer or character elements, but not both. Each array can be accesed by using array index and its is must be poitive integer value This is starts from the numerical value 0 and ends at 1 less thanof the array index value. For example an array[n] containing n number of elements are denoted by 0’s and 1’s is called array.
  • 5.
    A R RAY ARRAY OPERATIONS
  • 6.
    T y pe s o f A r r a y s One dimensional array 01 Two dimensional array 02 Multi dimensional array 03
  • 7.
    One dimensional array Onedimensional array is also caled as linear array. It is also represents 1-D array. The one dimensional array stores the data elements in a single row and column. 01 Two dimensional array 02 Multi dimensional array An array haves 2 or more subscripts, that type of array is called multi dimensional array, Each element of a3-D array id accessed using subscripts, one for each information. 03 A R R AY TYPES OF ARRAY A two dimensional array is a collection of elements placed in rows and columns. The syntax used to declare two dimensional array includes two subcripts, of which one specifies the number of rows and the other specifies the number of columns.
  • 8.
  • 9.
    S TA CK WHAT IS STACK? Representate of Stacks
  • 10.
    S TA CK  ([]({()}[())]) is not a simple counting is not enough to check balance.  You can do it with a stack: going left to right, • If you see a (, [, or {, push it on the stack. • If you see a ), ], or }, pop the stack and check wheather you got the corresponding (, [, or { Checking For Balanced Braces
  • 11.
    PUSH PEEK POP PUSH Adds theobject to the top of the stack. POP Removes the object at the top of the stack and returns it. PEEK. STACK OPERATI ONS S TA C K Returns the top object of the stack but does not remove it from the stack
  • 12.
  • 13.
    Front It is avariable which refers to first position in queue. 01 Rear It is a variable which refers to last position in queue. 02 Element It is a data component. 03 MaxQueue It is a variable thatdescribes maximum number of eements in a queue. 04 C o m p o n e n t s o f Q u e u e
  • 14.
    Q U EU E Queue is data structure whose its element can be added in the last element and taken only from the first element. Known as FIFO (First In First Out). DEFINITION
  • 15.
    S TA CK OPERATIONS
  • 16.
  • 17.
    L I NK E D L I S T INTRODUCTION Linked list is a linear data structure .It contains nodes. Each node contains two parts, 01 i.e. DATA part and LINK part. The data contains elements and Link cointains adress of another node. 02 LIMITATION OF ARRAY
  • 18.
    L I NK E D L I S T SINGLY LINKED LIST  Linked list is a collection of similar elements.  Each elements points to the necxt element.  Linked list i a linear list orf specially designed nodes, where each node divided into two parts. INFO FIELD NEXT FIELD  Info field: it contains necessary information about the item of the list to be stored and processed.  Next field: it contains adress of the next node. This field is used to access the next data item in other.
  • 19.
    Suppose a stackis to be implemented using a linked list instead of an array. What would be the effect on the time complexity of the push and pop operations of the implemented using linked list(Assuming stack is implemented efficiency)? Mention for which header list, you will found the last node contains the null pointer? Q U E S T I O N S
  • 20.