0% found this document useful (0 votes)
6 views13 pages

Introduction To Data Structure

Uploaded by

Prem Gupta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views13 pages

Introduction To Data Structure

Uploaded by

Prem Gupta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 13

Introduction to Data

Structure
Dr. Nitin Paharia
Associate Professor, Department of CSE,
PSIT, Kanpur
Outline
• Basic terminology
• What is data structure?
• What is the importance data structure?
Algorithmic Problems
• A problem is a pair of input specification and output
specification
The problem of search consists of the following specifications
▶ Input specification: a set S of elements and an element e
▶ Output specification: position of e in S if exists. If not found,
return -1.
Algorithms
An algorithm solves a given problem.
▶ Input ∈ Input specifications
▶ Output ∈ Output specifications

Note: there can be many algorithms to solve a problem.


Point to ponder:
1. What is an algorithm?
2. How is it different from a program?
Program
According to inventor of PASCAL language(Turing award winner
1984) Niklaus Wirth

Algorithms + Data Structures = Programs


What is Data?
• Things are not data, but facts about them are
data.

• It is a value or set of values


Example :
• Age of people, height of trees, price of stocks, and number of
likes.
• Image, Video, & Audio shared on social media
Data is Big!
• We are living in the age of big data!

Point to ponder
1. Estimate the number of messages exchanged for status level in
Whatsapp.
2. How much text data was used to train ChatGPT?
We need to work on data
• We process data to solve our problems.
• Example:
1. Predict the weather
2. Find a webpage
3. Recognize fingerprint
Are the data organized?
• Disorganized data will need a lot of time
to process.
• Point to ponder:
How much time do we need to find
an element in an array?

• *Image taken from internet


Data needs structure

• Storing data as a pile of stuff, will not work. We need


structure.

*Image taken from internet


Structured data helps us solve
problems faster
• We can exploit the structure to design efficient algorithms
to solve our problems.

The goal of this


course!
What is Data Structure?
• A way of organizing data in memory and set of operation performed
on the data.
• In other words, A data structure is a way to store and organize data in
order to facilitate access and modification

*Image taken from internet


Why data structures are important?

• DS facilitates the designing of algorithms for solving


complex problems.

• DS allows us to write efficient programs

You might also like