Sunteți pe pagina 1din 11

DATA STRUCTURE

By

Prof.Manikandan

QMC College, Medavakkam.


manisankar27@gmail.com

DEFINITION
The way of information is organized in the memory of a computer is called data
structure.
Not only the items stored, but also their relationship to each other.
Proper representation of data to achieve efficiency.
Each data structure allows insertion, access, deletion etc.
Data structure some times called data type.

DATA STRUCTURE = ORGANIZED DATA + ALLOWED OPERATIONS


GOALS
Component reuse.
Simplifying complex problems.
Creating programs that are easy to understand and maintain.

Advantages :

Reduce space and time.

DATA STRUCTURE TYPES

There are mainly two types of DS:

1. Static Data Structure


size fixed at compile time
Ex: Array
2. Dynamic Data Structure

Size is not fixed at Compile time


Ex: Linked list

DATA STRUCTURE LEVELS


1. Abstract level
2. Data Structure level
3. Implementation level
4. Application level
Abstract level
.Relationship among data function and procedure.
Data Structure level
.We can analyze the behavior of operation.
.How the data will be stored or how the operation will
be implemented

Implementation level
Decide the way to implement the data element.
Two ways : i.Arrays ii. Linked list
Application level
The particular application are decided.

PRIMITIVE AND COMPOSITE


DATA TYPE

Primitive data type


The basic data structure.
Closest to the machine level instructions.
Ex: int, char, and double.

Composite Data Type:


Defined by the user or programmer.
Not closest to the machine level instruction.
Ex: Array, Stack, Queue, Lined list.

Two types:
1. Linear DS
2. Non linear DS
Linear DS
. In

which the data item are stored in sequence order.


Ex: Array, Stack, Queue, Lined list.
Non linear DS
. In which the order of the data items is not sequence
order.
Ex: Trees, Graphs

ASYMPTOTIC NOTATION
Asymptotic notation are methods and process.
Used to estimate and represent the efficiency of an
algorithm using simple formula.
Complexity of an algorithm is usually represented in
O,,,,.
The asymptotic notations are defined only in terms of the
size of the input.

1.
2.
3.
4.
5.

Big-oh notation (O)


Big-omega notation()
Big-theta notation()
Little oh notation()
Little Omega notation ()

COMPLEXITY OF THE ALGORITHM

The analysis of the algorithm is made considering both


qualitative and quantitative aspects to get a solution.
1.
2.

Space Complexity
Time Complexity

Space:
. An algorithm is the amount of memory it needs to run the
algorithm.
Time:
. Amount of time is needs to run an algorithm.
. Time taken by the program is the sum of compile time and
run time

ARRAYS
Is a collection of similar type of data values
represented by a single variable name.
The very common linear data structure.
Very easy to traverse, search and sort.
An array is a list of a finite(limit) number of
homogeneous(common or similar) data elements.

Operations on Arrays:
1.
2.
3.
4.

Searching
Sorting
Traversing
Inserting.

ORDER LIST
An order list is a list in which the order of the
items is significant. (meaning)
The items in ordered list are not necessarily
sorted.
Very easy to traverse, search and sort.

Operations on Order list:


1.
2.
3.

Insert
Delete
Search

S-ar putea să vă placă și