INTRODUCTION TO DATA STRUCTURE. Topics To Be Discussed………………………. Meaning of Data...

14
INTRODUCTION TO DATA STRUCTURE

Transcript of INTRODUCTION TO DATA STRUCTURE. Topics To Be Discussed………………………. Meaning of Data...

Page 1: INTRODUCTION TO DATA STRUCTURE. Topics To Be Discussed………………………. Meaning of Data Structure Classification of Data Structure Data Structure Operations.

INTRODUCTION

TO

DATA STRUCTURE

Page 2: INTRODUCTION TO DATA STRUCTURE. Topics To Be Discussed………………………. Meaning of Data Structure Classification of Data Structure Data Structure Operations.

Topics To Be Discussed……………………….

Meaning of Data Structure

Classification of Data Structure

Data Structure Operations

Page 3: INTRODUCTION TO DATA STRUCTURE. Topics To Be Discussed………………………. Meaning of Data Structure Classification of Data Structure Data Structure Operations.

DATA STRUCTURE

A data structure is a class of data that can be characterized by its

organization and the operations that are defined on it.

Data Structure = Organized Data + Allowed Operations

In other words, the organized collection of data is called data structure. A

Data structure is a set of values along with the set of operations permitted

on them. It is also required to specify the semantics of operations

permitted on the data values, and this is done by using set of axioms,

which describes how these operations work.

Page 4: INTRODUCTION TO DATA STRUCTURE. Topics To Be Discussed………………………. Meaning of Data Structure Classification of Data Structure Data Structure Operations.

Therefore a data structure is made of :

A set of data values

A set of functions specifying the operations permitted on the data values

A set of axioms describing how these operations work.

Page 5: INTRODUCTION TO DATA STRUCTURE. Topics To Be Discussed………………………. Meaning of Data Structure Classification of Data Structure Data Structure Operations.

Classification of Data Structure

There are various ways to classify data structure :

Primitive and Non-Primitive Data Structure

Linear and Non-Linear Data Structure

Homogenous and Non-Homogeneous Data Structure

Static and Dynamic Data Structure

Page 6: INTRODUCTION TO DATA STRUCTURE. Topics To Be Discussed………………………. Meaning of Data Structure Classification of Data Structure Data Structure Operations.

Primitive and Non-Primitive Data Structure

The data structure that are atomic (indivisible) are called primitive.

Example are integer, real, Boolean and characters.

The data structure that are not atomic are called non-primitive or composite.

Example are records, array and string.

Page 7: INTRODUCTION TO DATA STRUCTURE. Topics To Be Discussed………………………. Meaning of Data Structure Classification of Data Structure Data Structure Operations.

Linear and Non- Linear Data Structure

In a linear data structure, the data items are arranged in a linear sequence.

Example is array.

In a non-Linear data structure, the data items are not in a sequence.

Example is tree.

Page 8: INTRODUCTION TO DATA STRUCTURE. Topics To Be Discussed………………………. Meaning of Data Structure Classification of Data Structure Data Structure Operations.

Homogeneous and Non- Homogenous Data Structure

In Homogeneous Structure, all the elements are of same type. Example is

arrays.

In Non-homogeneous structure, the elements may or may not be of same

type. Example is records.

Page 9: INTRODUCTION TO DATA STRUCTURE. Topics To Be Discussed………………………. Meaning of Data Structure Classification of Data Structure Data Structure Operations.

Static and Dynamic Data Structure

Static structures are ones whose sizes and structures, associated memory

location are fixed at compile time.

Dynamic structures are ones which expand or shrink as required during the

program execution and there associated memory location change.

Page 10: INTRODUCTION TO DATA STRUCTURE. Topics To Be Discussed………………………. Meaning of Data Structure Classification of Data Structure Data Structure Operations.

Data Structure Operations

There are six basic operations that can be performed on data structure:-

Traversing

Searching

Sorting

Inserting

Deleting

Merging

Page 11: INTRODUCTION TO DATA STRUCTURE. Topics To Be Discussed………………………. Meaning of Data Structure Classification of Data Structure Data Structure Operations.

(a)  Traversing

Traversing means accessing and processing each element in the data

structure exactly once.

This operation is used for counting the number of elements, printing the

contents of the elements etc.

b)  Searching

Searching is finding out the location of a given element from a set of

numbers.

Page 12: INTRODUCTION TO DATA STRUCTURE. Topics To Be Discussed………………………. Meaning of Data Structure Classification of Data Structure Data Structure Operations.

c)  Sorting

Sorting is the process of arranging a list of elements in a sequential order.

The sequential order may be descending order or an ascending order

according to the requirements of the data structure.

(d)  Inserting

Inserting an element is adding an element in the data structure at any

position. After insert operation the number of elements are increased by

one.

Page 13: INTRODUCTION TO DATA STRUCTURE. Topics To Be Discussed………………………. Meaning of Data Structure Classification of Data Structure Data Structure Operations.

e)  Deleting

Deleting an element is removing an element in the data structure at any

position. After deletion operation the number of elements are decreased by

one.

(f)  Merging

The process of combining the elements of two data structures into a single

data structure is called merging.

Page 14: INTRODUCTION TO DATA STRUCTURE. Topics To Be Discussed………………………. Meaning of Data Structure Classification of Data Structure Data Structure Operations.

THANKS