The algorithm is a word it is derived from the name “Al-Khawarizmi“. Al-Khawarizmi is a 9th century Persian mathematician and author of the book used for calculation by integration and balancing. But in these days the word algorithm is used for step-by-step method to solve a problems. But in algorithms everytime we will not use that step-by-step method because some cases are complicated.
An algorithm can be created in any programming language. Algorithms are not dependent of basic or any languages and algorithms are generally created.
Categories of an Algorithms
Search– Search algorithm is used for searching an item or component in data strcuture.
Sort– Sort algorithm is used for sorting an item or component in ascending or descending(certain) order.
Insert– This is used for inserting an element or an item in a data structure.
Update– This is used to update the actual or current existing element in data structure.
Delete– This is used to delete the current element in data structure.
Features of an Algorithm
Not every process is an algorithm. An algorithm should accept some following six features in data structures:
1. Definiteness: Algorithm must be clear and definite. In this steps are definitely stated or defined(precisely). Each and every steps and their inputs and outputs must be clear and definite.
2. Finiteness: An algorithm breaks after a finite set of instructions or programs when they are carried out that means it aborts after a finite set of programs.
3. Input: Algorithm must have 0 input or more distinct or clear-cut inputs. It collects the input.
4. Output: Algorithm must have 1 output or more distint or clear-cut outputs and it should not match with the applicable or appropriate output. It outcomes or produces the output.
5. Feasibleness: It means it must be suitable with possible or available resources.
6. Independent: An algorithm should have step-by-step directions, which should not be dependent of any programming code. These results are differently or uniquely defined.
How to Create an Algorithm?
We know that every programming languages can have essential code constructs like loops (do, for, while), flow-control (if-else), etc. These are very common instructions will be used to create an algorithm.
Generally an algorithm is used in a step-by-step procedure, but algorithm will not use this procedure every time. Algorithm is a technique and is executed after the issue is clear-cut. That means, an algorithm is used to design a explanation and clarification for the issues in an well-defined way.