






































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!







































I.Introduction
An algorithm is an effective step-by-step procedure for solving a problem in a finite number of steps. In other words, it is a finite set of well-defined instructions or step-by-step description of the procedure written in human readable language for solving a given problem.
EXAMPLE OF ALGORITHM: Step 1: Clean the skin for the purpose of removing dead skin, dirt, and oil ... These are the causes of acne. Skin does not absorb additional nutrients from cosmetic supplements. Use the right cleanser for your skin type for best results. Step 2: Moisturizing will make the skin healthy, elastic, and smooth. Moisturizing water provides adequate water and nutrients. Step 3: Protect skin with sunscreen. If you take care of the skin but forget this step, the skin will quickly age, darken and easily get other skin diseases.. Then, I will show you 3 steps to skincare:
There are some basic types of algorithms: o Swap numbers algorithm o Find min/max algorithm o Calculate sum algorithm o Search algorithm o Adding numbers algorithm Besides some basic types of algorithms, I will give some other types of them: 1.Recursive Algorithm
Example of Swap Numbers Algorithm:
Example of Calculate Sum Algorithm:
Example of Search Algorithm:
Example of Recursive Algorithm:
Example of Divide and Conquer Algorithm:
Example of Greedy Algorithm:
Example of Brute Force Algorithm:
As listed above, algorithms are extremely important and can be applied in different fields. From computer programming to scientific experiments, algorithms have found a vital place in several domains. Ideally, you can apply an algorithm flowchart in the following ways. In Computer Programming It doesn’t matter which programming language you are using, the first thing you need to solve a problem is by coming up with an algorithm. Even the most complex of problems can be resolved by working on an algorithm flowchart. Let’s consider that we have to write a program to automatically print numbers from 1 to 20. To do this, we initialize a variable and would perform an increment of 1 in every cycle. The cycle would be repeated till the number reaches 20.
In Mathematics and Scientific Calculations Just like programming, algorithms can also be used in solving mathematical or scientific problems. From printing the Fibonacci series to calculating the factorial of a number, you can come up with an algorithm for any math problem. In this example, you can see we have come up with an algorithm to convert Fahrenheit to Celsius. At first, we have taken the input from the user, applied the Fahrenheit to Celsius formula, and then would display the results.