Elementary Data
structure
Farhad Muhammad Riaz
1
Data Structures
What is a data structure?
Way of storing data that facilitates particular operations
Dynamic set operations: For a set S
Search(S,k) – Does k exist in S?
Insert(S,k) – Add k to S
Delete(S,x) – Given a pointer/reference, x, to an
element, delete it from S
Min(S) – Return the smallest element of
Max(S) – Return the largest element of S
2
Data Structures
What are some of the data structures you’ve
seen?
3
Array
4
Array
5
Linked list
6
Link List
7
Double Link List
8
Stack
9
Stack
10
Stack
11
Stack
12
Stack
13
Stack
14
Queue
15
Queue
16
Queue
17
Queue
18
19