Short Notes: Algorithm & Data Structure | Short Notes for Computer Science Engineering - Computer Science Engineering (CSE) PDF Download

Download, print and study this document offline
Please wait while the PDF view is loading
 Page 1


ALGORITHM AND DATA STRUCTURE
Algorithm
> An algorithm is a step-by-step procedure of solving a problem.
> It is defined as any well-defined computational procedure that takes some value as input, 
produces some value known as output within a finite amount of time.
> Different algorithms can be devised to solve a single problem.
Real world applications of algorithms
> The Human Genome project
> The Internet
> E-commerce
Data Structure
> A data structure is a way to store and organize data in order to facilitate access and 
modifications.
> For example, an array stores similar types of data sequentially while a structure stores data 
of different types. These two are basic data structures and are used to formulate other data 
structures.
> For example, we can create a structure to store the information of a student. An array of 
such a structure will store the details of several students. So this array of structure will 
represent another data structure.
> Other well-known data structures include stack, queue, linked list, trees etc.
> No single data structure works well for all purposes, so it is important to understand 
multiple data structures.
Difference between algorithm and data structure
> An algorithm is a way to solve a problem where as a data structure is a way to store 
similar or heterogeneous data.
> Every algorithm must work on some specific data structure (be it an array or a tree or a 
list).
> In simpler terms, the way we store data is data structure and the way we access and 
modify that data is the algorithm.
Page 2


ALGORITHM AND DATA STRUCTURE
Algorithm
> An algorithm is a step-by-step procedure of solving a problem.
> It is defined as any well-defined computational procedure that takes some value as input, 
produces some value known as output within a finite amount of time.
> Different algorithms can be devised to solve a single problem.
Real world applications of algorithms
> The Human Genome project
> The Internet
> E-commerce
Data Structure
> A data structure is a way to store and organize data in order to facilitate access and 
modifications.
> For example, an array stores similar types of data sequentially while a structure stores data 
of different types. These two are basic data structures and are used to formulate other data 
structures.
> For example, we can create a structure to store the information of a student. An array of 
such a structure will store the details of several students. So this array of structure will 
represent another data structure.
> Other well-known data structures include stack, queue, linked list, trees etc.
> No single data structure works well for all purposes, so it is important to understand 
multiple data structures.
Difference between algorithm and data structure
> An algorithm is a way to solve a problem where as a data structure is a way to store 
similar or heterogeneous data.
> Every algorithm must work on some specific data structure (be it an array or a tree or a 
list).
> In simpler terms, the way we store data is data structure and the way we access and 
modify that data is the algorithm.
Properties of Algorithm
An algorithm must have the following properties.
> Input: An algorithm must take some (possibly one) input value.
> Output: An algorithm must produce some definite outputs.
> Finiteness: An algorithm must terminate after a finite number of steps.
> Definiteness: An algorithm should be definite, i.e. it shouldn’t contain any ambiguity at 
any step.
> Effectiveness: One must be able to perform the steps in algorithm without applying any 
intelligence.
Types of algorithm
Algorithms generally fall under two categories:
> Iterative: These algorithms sequentially execute the input using loops and conditional 
statements. E.g. Linear search
> Recursive: These algorithms recursively break a larger problem into some smaller 
problems and solve those problems. Then they combine the result of smaller problems to 
solve the main given problem.
Read More
90 docs

Top Courses for Computer Science Engineering (CSE)

Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev
Related Searches

Previous Year Questions with Solutions

,

Free

,

MCQs

,

Short Notes: Algorithm & Data Structure | Short Notes for Computer Science Engineering - Computer Science Engineering (CSE)

,

Semester Notes

,

video lectures

,

Exam

,

Objective type Questions

,

study material

,

Extra Questions

,

past year papers

,

practice quizzes

,

Short Notes: Algorithm & Data Structure | Short Notes for Computer Science Engineering - Computer Science Engineering (CSE)

,

Viva Questions

,

Summary

,

mock tests for examination

,

shortcuts and tricks

,

Short Notes: Algorithm & Data Structure | Short Notes for Computer Science Engineering - Computer Science Engineering (CSE)

,

Sample Paper

,

Important questions

,

ppt

,

pdf

;