DS Unit 01.01
DS Unit 01.01
SUBJECT: DATA
STRUCTURE
UNIT-1 : Introduction to Data Structure
-PROF. ANKIT
PATEL
Introduction to Data Structure:
❑ Computer is an electronic machine which is used for data processing and
manipulation.
❑ When programmer collects such type of data for processing, he would
require to store all of them in computer's main memory.
❑ In order to make computer work we need to know
1) Representation of data in computer.
2) Accessing of data.
3) How to solve problem step by step.
❑ Data structure is a representation of the logical relationship existing between
individual elements of data.
❑ Data Structure is a way of organizing all data items that considers not only the
elements stored but also their relationship to each other.
-- What is Data Structure?
❖ Algorithm Efficiency:
❑ Some algorithms are more efficient than others. We would prefer to choose an
efficient algorithm, so it would be nice to have metrics for comparing algorithm
efficiency.
❑ The complexity of an algorithm is a function describing the efficiency of the
algorithm in terms of the amount of data the algorithm must process.
❑ Usually there are natural units for the domain and range of this function. There
are two main complexity measures of the efficiency of an algorithm
Time and space analysis of algorithms :
❖ Time complexity :
❖ Space complexity: