Course Content
Flowgorithm Features
Flowgorithm Features
0/1
Flowgorithm User Interface
Flowgorithm User Interface
0/3
Flowgorithm Flowchart Shapes
Flowgorithm Flowchart Shapes
0/1
Flowgorithm Data Types
Flowgorithm Data Types
0/1
Flowgorithm Comments
Flowgorithm Comments
0/1
Flowgorithm Numbers
Flowgorithm Numbers
0/1
Flowgorithm Strings
Flowgorithm Strings
0/1
Flowgorithm File Format
Flowgorithm File Format
0/1
Flowgorithm Program Attributes
Flowgorithm Program Attributes
0/1
IPO Chart
IPO Chart ( Input, Process and Output Chart )
0/2
First Flowgorithm Flowchart
First Flowgorithm Flowchart
0/2
Add Two Numbers Flowchart
Add Two Numbers Flowchart
0/2
Flowgorithm Quiz
Flowgorithm Quiz
0/1
Flowgorithm Beginner Exercises
Flowgorithm Beginner Exercises
0/1
Flowgorithm Beginner Course
About Lesson

What is an Algorithm?

An algorithm is a sequence of steps executed to solve a problem. The steps should be precise, and the result should be obtained after executing a finite number of steps, i.e., an algorithm should halt after a finite amount of time. There can be multiple ways to solve a problem. An efficient algorithm should take less space and time.

An algorithm can be analyzed mostly on two factors:

  • Time Complexity – Execution Time taken by the algorithm.
  • Space Complexity – Amount of Space required by the algorithm.

When designing an algorithm, we need to consider the computer’s architecture. Computer architectures can be sequential or parallel.

Sequential Algorithm

A sequential algorithm executes the steps or instructions in sequence one after another.

Parallel Algorithm

Time/mission-critical systems need faster output. These systems use parallel algorithms. A parallel algorithm can execute several steps concurrently on different processors and combine all the individual results to produce the final output.

Algorithm Example

Algorithm to find the greater number between two numbers

START
    Declare Integer A
    Declare Integer B
    
    OUTPUT "Enter number A = "
    INPUT  A
    OUTPUT "Enter number B = "
    INPUT B
    IF A > B
        OUTPUT "Greater Number of A and B is = " & A
    ELSE
        IF A == B
            OUTPUT " Both A and B numbers are Equal."
        ELSE
            OUTPUT "Greater Number of A and B is = " & B
END