All Data Structure
All Data Structure
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
0 1 2 3 4 5
Arr
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
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
00
James
01 555-123-4251
Ellen 02
03 621-236-7423
Bill 04 754-231-5342