Data Structure: by Prof - Manikandan QMC College, Medavakkam
Data Structure: by Prof - Manikandan QMC College, Medavakkam
By
Prof.Manikandan
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.
Advantages :
Implementation level
Decide the way to implement the data element.
Two ways : i.Arrays ii. Linked list
Application level
The particular application are decided.
Two types:
1. Linear DS
2. Non linear DS
Linear DS
. In
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.
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.
Insert
Delete
Search