DSA-Python

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:

  1. It should terminate after finite amount of times.
  2. Produce at-least one output
  3. Independent of any programming languages.
  4. The output should be deterministic

Steps to construct an Algorithm:

  1. Problem definition
  2. Design a Algorithm
    • Divide and Conquer
    • Greedy Algorithm
    • Dynamic Programming and many more
  3. Draw a flow chart
  4. Testing Phase
  5. Implementation
  6. 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.