An algorithm

An algorithm in computer science is a set of steps that needs to be taken to solve a specific problem and the proper order of these. An algorithm is not an implementation details but a step above it. An algorithm can be efficient or not. Please think of a loop to find a correct value. It is possible to iterate through all of the values in a sequence or exit this loop after correct value is found. A person needs to think about not only correctness of an algorithm, but about it effectiveness too.

Real life example of an algorithm is how a person needs to prepare a soup. It is possible to put vegetables in a pot, however water needs to be added first, without adding water it will be not a soup, but fried vegetables. Hopefully there is a smoke detector in that room.

Comments

Popular posts from this blog

Absolute and relative path in HTML pages

Errors

goto PHP operator