**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[0];

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:

### Click Here to Avail GATE CSE Test Series!

**Thanks**

**#DreamStriveSucceed**

## Comments

write a commentSreerup KarmakarSep 5, 2016

Roshan DeshmukhApr 17, 2017

Deepali JoshiJul 28, 2017

LaxmiAug 22, 2017

Shraddha PanchbudheDec 30, 2017

bandameedi lahariJul 17, 2018

Even yesterday's and today's

Rakesh NamaAug 17, 2019

Pages from Algorithm.pdfDwarika JangdeDec 9, 2019

Harika YelisalaJan 27, 2020

Ashiyana KhatunAug 7, 2020