0% found this document useful (0 votes)
18 views

All Data Structure

All Types of Data Structure

Uploaded by

Ritik kumar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

All Data Structure

All Types of Data Structure

Uploaded by

Ritik kumar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

A l l Dat a

St . . .
I I
s
Array
An Array is a collection of items
stored at contiguous memory
locations. The idea is to store the
multiple items of the same type
together.
learn_programo

_.,.Index of array element.

0 1 2 3 4 5

Arr

l 100 104 108 112 116 \ 120


'
Array name
\
I
'
Memory location
~
Array element
Linked List
A Linked List is a linear data
structure, in which the elements
are not stored at contiguous
memory locations. It consist of
nodes where each node contains
a data field and a link to the next
node in the list.
- - learn_programo

Data ~ ; Address

l
Node

I
10
I I ►1 20
I I ►1 30
I I
\
y
Linked List
Graph
A Graph is a non-linear data
structure consisting of vertices
and edges. The vertices are
sometimes also reffered to as
nodes and the edges are lines or
arcs that connect any two nodes
in the graph.
learn_programo

- - - Node
Queue
A Queue is defined as a linear
data structure which is open at
both ends and the operations are
performed in First In First Out
(FIFO) order. The element which
is first pushed into order, the
operation is first performed on
that.
learn_programo

FRONT

- - - Quet1e

Enqueue
- 1 2 3 4

Dequeue

REAR
Tree
A Tree is a non-linear hierarhical
data structure that consists of
nodes connected by edges. A
node is an entity that contains a
key or value and pointers to its
child nodes.
learn_programo

Root

Key-

Height
, ,, of the
tree
Parent ,, ' iblings

, , ~ Subtree
"- - - _,
I

Children Leaf nodes


Stack
Stack is a linear data structure
which follows a particular order
in which the operations are
performed. The order may be
LIFO(Last In First Out) or FILO
(First In Last Out).
learn_programo

i

r
Last In - First Out
Push Pop
r oaia Element-
l ~ Element 1
Data Element
___)
~Data Element )
' ,,.
I. Data Elementj Data EJement ]

-------
Data Element ~Element 7
'- __)
r
'- Data Element J Data Element l
Stack Stack
Hash Table
Hash Table is a data structure
which stores data in an associative
manner. In a hash table, data is
stored in an array format, where
each data value has its own
unique index value.
learn_programo

keys hash function storage

00
James
01 555-123-4251

Ellen 02

03 621-236-7423
Bill 04 754-231-5342

05 883 - 234 - 1236


Susan
06

You might also like