Hello Viewer! how are you? I hope you are very well. Today I have learned about Algorithm in Computer Programming. below I have written whatever I learn today ...
ALGORITHM
The typical definition of an algorithm is a "Formally defined procedure for performing some calculation".
If a procedure is finally defined, then it can be implemented using formal language and such language is known as "Programming Language".
In general terms, an algorithm provides a blueprint to write a program to solve a particular problem.
It is considered to be an effective procedure for solving a problem in a finite number of steps. [i.e. a good algorithm always provides an answer and is guaranteed to terminate]
Algorithms are mainly used to achieve software reuse. Once we have an idea or blueprint of a solution, we can implement it in any language like C, C++, or Java.
An Algorithm is basically a set of instructions that solve a problem.
It is not uncommon to have multiple algorithms to tackle the same problem but the choice of the particular algorithm must depend on the time and space complexity of the algorithm.
DIFFERENT APPROACHES TO DESIGNING AN ALGORITHMS
Algorithms are used to manipulate the data contained in data structures.
When working with data structures algorithms are used to perform operations on the stored data.
A complex algorithm is often divided into smaller units called "Modules". this process of dividing an algorithm into modules is called "Modularization".
Advantages of Modularization
- It makes the complex algorithm simple to design and implement.
- Each module can be designed independently.
- While designing one module, the details of another module can be ignored.
- Top-Down Approach
- Bottom-Up Approach