# Introduction of Algorithm Study Notes for GATE & Computer Science Engineering Exams

By Mukesh Kumar|Updated : December 12th, 2021

The Algorithm is an essential subject from GATE and other exams' perspectives. In this article, we are going to provide study notes on Introduction to Algorithm.

An algorithm is a set of rules or instructions needed to be followed step by step to accomplish a task. A task could be a simple process like adding or multiplying two numbers or any complex process like extracting text from images.

Why learn algorithms?
The Algorithm is an essential subject to learn; now the question arises what makes Algorithm an essential and different subject? Algorithms provide a better and efficient approach to problem-solving; you can solve any problem with linear time and space complexity if you are familiar with algorithms and data structure. Our computer uses more deterministic and more straightforward approaches to solve any problem, which is all possible only because of algorithms.
Algorithms are the way to implement and solve daily life problems programmatically. You can write simple approaches and their steps to solve a daily life problem. After converting those steps into code, that problem could be solved. Moreover, algorithms are used for better implementation of different data structures to save time and space.

## Algorithm:

• An algorithm is a sequence combination of finite steps to solve a particular problem.
• It is a finite step-by-step procedure to achieve a required result.
• An algorithm always produces at least one output.
• It always terminates an infinite amount of time.
• An algorithm is independent of the programming language.

## Analysis of Algorithms:

Analysis of algorithms is the study of computer program performance and resource usage. Following things are considered to be very important to design the Algorithm.

• User-friendliness
• The modularity of the program
• Programmer's time
• Correctness of the program
• Security
• Maintainability
• Robustness
• Functionality
• Reliability
• Simplicity
• Scalability
• Extensibility

## The Algorithm can be designed for the many problems:

• Searching an element
• Sorting n numbers
• Finding maximum and minimum elements from a given list
• Single source shortest path
• Sum of n numbers
• Travelling Salesman problem
• All pairs shortest path,
• Minimum spanning tree, etc.

## The strategy of Algorithms:

• Divide & conquer Algorithms
• Greedy Algorithms
• Dynamic programming
• Prune & search Algorithms
• Approximation Algorithms
• Heuristics
• Branch and bound Technique

## Example-1: Find the maximum of the given array of elements

Maximum(A, n)

{

Max = A;

for (i = 1 to n −1)

if Max < A[i] then Max = A[i];

}

return Max;

}

Candidates can also practice 110+ Mock tests for exams like GATE, ISRO, DRDO, BARC, and NIELIT, etc. with BYJU'S Exam Prep Test Series; check the following link: GradeStack Learning Pvt. Ltd.Windsor IT Park, Tower - A, 2nd Floor, Sector 125, Noida, Uttar Pradesh 201303 help@byjusexamprep.com