What is Data Structures and Algorithm (DSA)
Algorithm is a step by step procedural way to sort any problem(Say to add two numbers). There is not any well standard defined to write algorithm. Also, we don’t write any programming code in this.
We generally use this approach as it takes less time to express our logic or ideology on how we are going to solve any specific problem. If we directly implement any solution to our project code it might arise any issue in future and we may have to revert back our all work. In addition cost of development also get increased.
To avoid this algorithms, flow chart or pseudocode are being involved before any creation of software product. Suppose if there are more than one possible solutions that we express with the help of more than one algorithm. Then you could easily differentiate which algorithm get fit into your needs with better performance.
Example
To Add two numbers
- Start
- Declare variables ‘a’ , ‘b’ for two numbers and ‘sum’ to hold the result.
- Add value of ‘a’, ‘b’ and store in ‘sum(sum = a+b).
- Display the output.
- Stop
Or you can express within steps in your own way as well.