Algorithms, Pseudocode and
FlowChart
Engr Dr. Akpofure Enughwure
Algorithm
• Definition:
A step-by-step procedure to solve a problem or perform a
computation. It is a conceptual idea independent of programming
language.
• Key Features:
• Language-agnostic (can be expressed in plain English or math).
• Focuses on logic and steps, not implementation details.
• Must be clear, finite, and unambiguous.
Algorithm - Example
Finding the max of two numbers:
• Start.
• Read two numbers, A and B.
• If A > B, output A; else, output B.
• End.
Pseudocode
• Definition:
A high-level, informal description of an algorithm using a mix of natural
language and programming-like syntax. It bridges the gap between
algorithms and code.
• Key Features:
• Not executable (no strict syntax rules).
• Uses constructs like loop ( for, while), conditionals (if-else), and functions
• Easier to understand than raw code but more structured than plain text.
Pseudocode – Example (Same max-finding
problem)
• INPUT A, B
• IF A > B THEN
• PRINT A
• ELSE
• PRINT B
• END IF
Flowchart
• Definition:
A visual representation of an algorithm using symbols (e.g., rectangles,
diamonds) and arrows to show control flow.
• Key Features:
• Uses standardized symbols:
• Oval: Start/End.
• Rectangle: Process (e.g., calculations).
• Diamond: Decision (e.g., if-else)
• Arrows: Flow direction.
• Ideal for complex logic with branching paths.
Flowchart –Example (Max of two numbers):
Figure 1: Flowchart Illustration
Comparison Table
Aspect Algorithm Pseudocode Flowchart
Form Textual steps Structured text Visual diagram
Detail Level High-level logic Near-code clarity Graphical flow
Use Case Planning logic Drafting code logic Visualizing process
Programmers & non-
Audience Programmers Programmers
programmers
Helps programmers plan Visualizes workflows for
logic before coding. non-programmers (e.g.,
Acts as a blueprint for
Purpose Useful for collaboration stakeholders).
writing code
and debugging. Debugging and
documenting processes.
THANK YOU