DSA-Python
We are going to see Data Structures and Algorithms parallel and I will use Python language for code implementations.
Algorithms:
A sequence of finite steps to perform some tasks.
Example : Multiplications of two numbers
Properties of Algorithms:
- It should terminate after finite amount of times.
- Produce at-least one output
- Independent of any programming languages.
- The output should be deterministic
Steps to construct an Algorithm:
- Problem definition
- Design a Algorithm
- Divide and Conquer
- Greedy Algorithm
- Dynamic Programming and many more
- Draw a flow chart
- Testing Phase
- Implementation
- Analysis
while(True):
print("DSA using Python")
The above code is not a valid algorithm why because there is no termination in the code. Lets discuss each topics one by one.