Algorithm is a process or set of rules to be followed in calculations or other problem-solving operations.
Algorithms are the efficient ways to do math.
For example 90 divided by 5. We know that, answer for 90/5 = 18 Now the question is how do we get this answer?
Answer includes the following steps,
- First divide 9 by 5
- How many times does 5 go into 9?
- A: only once = 1
- What is remainder when 9 is divided by 5?
- it is 4
- Put that 4 in front of 2 (in 90), it will be 40
- how many times does 5 goes into 40?
- A: 8
- Therefore the answer is 18 when 90 is dived by 5 with remainder 1.
This is called Algorithm.