0% found this document useful (0 votes)
3 views1 page

7 Algorithm

Pseudocode is a way to describe algorithms using natural and programming language, allowing programmers to outline their thoughts without strict coding syntax. An algorithm is defined as a sequence of steps that convert input into output, characterized by input, output, finiteness, and performance metrics like space and time complexity. Time complexity can be challenging to measure due to various influencing factors such as system load and hardware speed.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views1 page

7 Algorithm

Pseudocode is a way to describe algorithms using natural and programming language, allowing programmers to outline their thoughts without strict coding syntax. An algorithm is defined as a sequence of steps that convert input into output, characterized by input, output, finiteness, and performance metrics like space and time complexity. Time complexity can be challenging to measure due to various influencing factors such as system load and hardware speed.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

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.

You might also like