# Algorithms

A computer program is clear instructions in a programming language that solve some problem. You can write this program in different programming languages, but the solution to the problem irrespective of programming language remain the same. Therefore, an algorithm is an independent solution to a computer-based problem.

It is possible to automate tasks using algorithms, and creating program based on our algorithms. But, sometimes a computational problem can be solved using multiple algorithms, in which case, we have to choose the “best” or “optimized” algorithms to solve that problem.
The choice of best algorithm is based on several factors such as space to store input variables, time taken to solve the problem for a given input and so on. These are known as algorithm performance metrics. They are necessary to compare two different algorithms for best , average, and worst case scenarios.

In this tutorial you will study different types of factors that affect the choice of a good algorithm to solve a problem. You will learn about different type s of algorithm design techniques, and familiar patterns like search algorithm, sorting algorithms, etc.

This tutorial is meant for beginner who are new to algorithms. Some experience with a programming language is sufficient to start learning algorithms, but here are some more information about prerequisites to learn algorithms.

• You must be familiar with basic mathematical concepts such as exponents, set theory, mathematical induction, trees, graphs, relations, limits and so on.
• Some knowledge of programming is recommended such as C/C++ or Java Programming.
• Knowledge of data structures is an advantage because almost all algorithms use some kind of data structures.If you don’t have the knowledge , then you should learn about stack, queues, link-lists, and trees structures at least.

You can visit our programming tutorials to learn programming concepts to get comfortable with algorithms.

## Algorithms Tutorial Topics

Here is a list of topics for algorithms. Read from top (easy) to bottom (difficult).

## Studying from Books

Other than learning from this tutorial, you can also learn from a good book. The prerequisite to learn algorithms design is the same what I mentioned earlier. You must know foundational mathematics, and a little programming to understand the concepts. It might be easier to grasp the concepts. Besides more knowledge on the algorithm topics, a book can be a great offline help. Some books have lot of exercises which you can try on your own.

As I mentioned earlier, data structures are important in understanding algorithm design techniques. There are books that provide you will knowledge of data structures before you start algorithms chapters. I recommend those kind of books if you lack data structure knowledge. 