by BehindJava
What is an Algorithm
In this blog, we are going to learn about Algorithm in Data Structures.
Algorithm
An algorithm is a sequence of unambiguous instructions for solving a problem, i.e., for obtaining a required output for any legitimate input in a finite amount of time.
- Can be represented various forms.
- Un-Ambiguity/clearness.
- Effectiveness.
- Finiteness/termination.
- Correctness.
Two main issues related to algorithms
- How to design algorithms
- How to analyze algorithm efficiency
Algorithm design techniques/strategies
- Brute force
- Divide and conquer
- Decrease and conquer
- Transform and conquer
- Space and time tradeoffs
- Greedy approach
- Dynamic programming
- Iterative improvement
- Backtracking
- Branch and bound