PSEUDOCODE & ALGORITHM
Pseudocode is a method of describing computer algorithms using a combination of natural
language and programming language. It allows the programmer to formulate their thoughts on
the organization and sequence of a computer algorithm without the need to follow the exact
coding syntax.
Algorithm: An algorithm is a sequence of computational steps that transform the input into
output.
Characteristics of Algorithm:
Input: An algorithm should take one or more inputs from an external user.
Output: An algorithm should produce at least one output.
Finiteness: The algorithm should be finite. That means after performing the required
operations, it should terminate.
Performance: We can measure the performance of an algorithm by computing two factors.
a) Space Complexity: The amount of storage required by an algorithm, which is known
as space complexity. It depends on variables, objects, header files, and functions.
b) Time Complexity: The computer time required to execute the complete algorithm.
It is difficult to compute the time complexity in terms of time. Executing time depends upon
many factors, such as:
• System Load
• Number of programs running
• Speed of processor and hardware.
Time complexity is given in terms of frequency count; frequency count is a count denoting
the number of times of execution of a statement.