Topics

6/recent/ticker-posts

Algorithm and its different approaches in Data Structures


 What is an algorithm? 

Definition : An algorithm is a process of step by step procedure to solve a problem. In general language, algorithm can be defined as the sequence of statements which are used to perform a different task. In computer science engineering , an algorithm will or can also be defined as follows..

                (OR)

 An algorithm is a sequence of unambiguous instructions that are used for solving a problem, which can be implemented in the form of a program on a computer.

Some ways of approaching a Design to an Algorithm

             1. Divide and conquer

            2. Greedy Method

            3. Dynamic Programming

            4. Backtracking

            5. Branch & Bound

Divide and Conquer Method: 

    The divide and conquer method is applied in the following given algorithms:

           a. Binary search

           b. Quick sort

           c. Merge sort

Dynamic Programming: 

    Recursive algorithm for Fibonacci Series will be an example of dynamic programming.

Greedy Method:

     Any algorithm which will create group of objects and  work recursively from the least or smallest possible or available component parts is known as Greedy Method. Recursion is a process of solving a problem in which the solution will be dependent on some part of that problem.

Branch and Bound:

    The main purpose of a branch and bound search in data structure is to maintain the lowest-cost path to a fixed target. Once the solution is found, then it starts improving the solution. Branch and bound search can also be implemented in depth-bounded search and depth–first search.

Backtracking: 

   Any general algorithmic technique that considers searching every possible combination in order to solve a computational problem is called or known as Back tracking . 

Recursive Algorithm:

Any algorithm which when called by itself with least or smaller  input values , and obtain the result for the present or current input value  by applying some simple operations to the returned value for the least input is called recursive algorithm . This recursive algorithm requires more and more memory. 


Post a Comment

0 Comments