0% found this document useful (0 votes)
3 views11 pages

Data Structures and Algorithms Overview

The document discusses data structures and algorithms, defining a data structure as a named location for storing and organizing data, with examples of linear (arrays, stacks) and non-linear (trees, graphs) structures. It also describes algorithms as step-by-step procedures for solving problems, emphasizing qualities of good algorithms and providing examples such as adding numbers and finding factorials. The importance of using data structures and algorithms for scalable programming is highlighted, noting the value of time and memory efficiency.

Uploaded by

Erica De Padua
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)
3 views11 pages

Data Structures and Algorithms Overview

The document discusses data structures and algorithms, defining a data structure as a named location for storing and organizing data, with examples of linear (arrays, stacks) and non-linear (trees, graphs) structures. It also describes algorithms as step-by-step procedures for solving problems, emphasizing qualities of good algorithms and providing examples such as adding numbers and finding factorials. The importance of using data structures and algorithms for scalable programming is highlighted, noting the value of time and memory efficiency.

Uploaded by

Erica De Padua
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

Data Structure and Algorithm

COLLEGE OF COMPUTER STUDIES: CSCC5 - Data Structures and Algorithm


• A computer program is a collection of
instructions to perform a specific task. For this,
a computer program may need to store data,
retrieve data, and perform computations on the
data.

COLLEGE OF COMPUTER STUDIES: CSCC5 - Data Structures and Algorithm


COLLEGE OF COMPUTER STUDIES: CSCC5 - Data Structures and Algorithm
A data structure is named a location that can be
used to store and organize data.

COLLEGE OF COMPUTER STUDIES: CSCC5 - Data Structures and Algorithm


COLLEGE OF COMPUTER STUDIES: CSCC5 - Data Structures and Algorithm
• Linear data structure: Data structure in which
data elements are arranged sequentially or
linearly, where each element is attached to its
previous and next adjacent elements, is called a
linear data structure.
Examples of linear data structures are array,
stack, queue, linked list, etc.
• Static data structure: Static data structure has a
fixed memory size. It is easier to access the elements
in a static data structure.
An example of this data structure is an array.
• Dynamic data structure: In dynamic data structure,
the size is not fixed. It can be randomly updated during
the runtime which may be considered efficient
concerning the memory (space) complexity of the
code.
Examples of this data structure are queue, stack, etc.
COLLEGE OF COMPUTER STUDIES: CSCC5 - Data Structures and Algorithm
COLLEGE OF COMPUTER STUDIES: CSCC5 - Data Structures and Algorithm
• Non-linear data structure: Data
structures where data elements are
not placed sequentially or linearly are
called non-linear data structures. In a
non-linear data structure, we can’t
traverse all the elements in a single
run only.
Examples of non-linear data structures
are trees and graphs.

COLLEGE OF COMPUTER STUDIES: CSCC5 - Data Structures and Algorithm


COLLEGE OF COMPUTER STUDIES: CSCC5 - Data Structures and Algorithm
• Algorithm is a collection of steps to solve a
particular problem.

COLLEGE OF COMPUTER STUDIES: CSCC5 - Data Structures and Algorithm


COLLEGE OF COMPUTER STUDIES: CSCC5 - Data Structures and Algorithm
Qualities of a good
algorithm
• Input and output should be defined precisely.
• Each step in the algorithm should be clear and
unambiguous.
• Algorithms should be most effective among
many different ways to solve a problem.
• An algorithms shouldn’t include computer code.
Instead, the algorithm should be written in such
a way that it can be used in different
programming languages.

COLLEGE OF COMPUTER STUDIES: CSCC5 - Data Structures and Algorithm


COLLEGE OF COMPUTER STUDIES: CSCC5 - Data Structures and Algorithm
Examples of
Algorithm

COLLEGE OF COMPUTER STUDIES: CSCC5 - Data Structures and Algorithm


COLLEGE OF COMPUTER STUDIES: CSCC5 - Data Structures and Algorithm
Algorithm Examples
• Algorithm to add two numbers
• Algorithm to find the largest among three
numbers
• Algorithm to find all the roots of the quadratic
equation
• Algorithm to find the factorial
• Algorithm to check prime number
• Algorithm of Fibonacci series

COLLEGE OF COMPUTER STUDIES: CSCC5 - Data Structures and Algorithm


COLLEGE OF COMPUTER STUDIES: CSCC5 - Data Structures and Algorithm
• Programming is all about data structures
and algorithms.
• Data structures are used to hold data while
algorithms are used to solve the problem
using that data.

COLLEGE OF COMPUTER STUDIES: CSCC5 - Data Structures and Algorithm


COLLEGE OF COMPUTER STUDIES: CSCC5 - Data Structures and Algorithm
Use of Data Structures and
Algorithms to make your
code scalable

• Time is precious
• More on scalability
• Memory is expensive

COLLEGE OF COMPUTER STUDIES: CSCC5 - Data Structures and Algorithm


COLLEGE OF COMPUTER STUDIES: CSCC5 - Data Structures and Algorithm

You might also like