Module 2 Flowcharts & Algorithmswith.pdf

mahindrareddykolli94 18 views 15 slides Oct 08, 2024
Slide 1
Slide 1 of 15
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15

About This Presentation

flowcharts and algorithms


Slide Content

Module-2
Flowcharts & Algorithms
Flowcharts
Algorithms
Pseudocode
Time & Space Complexity.
1.
2.
3.
4.

Flowcharts

What are Flowcharts ?
Flowchart is a diagrammatic representation of sequence of
logical steps of a program.

Symbols
Flowcharts use simple geometric shapes and arrows for
processes and data flow.

Area of a Rectangle
input:
l,b
Output:
Area of Rectangle

My Approach for getting Idea
Input -> Process -> Output Strategy

Algorithms

Algorithms
Algorithm is a step-by-step procedure, which defines a set
of instructions to be executed in a certain order to get the
desired output.

step 1 − START
step 2 − declare three integers a, b,c
step 3 − define values of a & b
step 4 − sum calculation of a & b
step 5 − store output of step 4 to c
step 6 − print c
step 7 − STOP
Sum of 2 digits
input:
a,b
Output:
Sum of a and b

Sum of 2 digits Explaination
input:
a,b
Output:
Sum of a and b

Pseudocode

Pseudocode
A way of expressing an algorithm without conforming
to specific syntax rules.
An informal high-level representation of the actual
code
set i to 0
for each i from 0 to 9
if i is odd
print i
end for loop
Example

Time & Space
Complexity

Time Complexity:
The time complexity of an algorithm quantifies the
amount of time taken by an algorithm to run as a function
of the length of the input.
Space Complexity:
Problem-solving using computer requires
memory to hold temporary data or final result
while the program is in execution. The amount
of memory required by the algorithm to solve
given problem
Tags