Where might you have seen our work?Small places create combinations, but crosses that occur cannot provide many combinations. So be careful in making justifications, especially SEO.
Last updated: Sep 13, 2022
What is an Algorithm?
An algorithm is a series of steps that must be taken to solve a problem in an application or system. In other words, this is a collection of logical steps that are ordered based on a certain system in problem-solving.
Each problem-solving method certainly has characteristics, as well as algorithms. According to Donald E. Knuth, some of the algorithm characteristics are as follows:
Have an Input
In providing the expected results or output, the algorithm requires input from the user. Input is the amount of value or command given to the algorithm before it processes it into an output. For example, the input is text or numbers. An algorithm can have no input or have several inputs at once.
Besides having input, the algorithm also has an output which is the solution or result of solving the problem at hand. An algorithm can have one or more outputs. If the algorithm does not return the expected output, there could be an error in your algorithm.
There is A Process
One of the algorithm characteristics is that it has a process consisting of steps to solve a problem. A process is an action taken to convert user input into the expected output.
Effective and Efficient
Algorithms must be made effectively and efficiently. Each step that is carried out must be made as simple as possible so that the time required to display the output is not too long.
Another algorithm characteristic is that it is clear and unambiguous. That is, each step or step was taken in an algorithm has only one meaning. That way, the resulting program can display the expected output.
Has Step Limits
The algorithm will stop after doing certain steps or after finding a solution to the problem. If the algorithm of a program cannot stop, then there is an indication of an error in the algorithm.
In general, the function of an algorithm is to help you find a way to solve a problem. In addition, some algorithm functions are as follows:
- Facilitate problem-solving through logical and systematic steps
- Simplify the process of creating large and complex programs
- Minimizing writing errors in a program that is written repeatedly
- The process of documenting work becomes easier
- Easier to spot the errors in the process
Types of Algorithms
Algorithms are divided into several types according to the input processing stages to produce a certain output. The types of algorithms are as follows:
This is the algorithm that has sequential steps from beginning to end. Each step must be executed sequentially from the very top to the bottom line of the code so that the resulting output is as expected.
Loop algorithm is an algorithm that has certain steps and is executed repeatedly. The loop will only stop when certain conditions or loop constraints are met.
Branching or Conditional Algorithm
A branching or conditional algorithm is an algorithm that has a number of steps with certain conditions. In this algorithm, to perform the next step usually must meet certain conditions first.
WDYT, you like my article?