Advertisement

Type of Data Structure & Algorithm

Types of Data Structure:

 

Types of Algorithm: 

  • Simple recursive Algorithm

    Recursion can defined as a function calling itself until and unless it reaches to base condition and it stops. Recursion utilizes the stack segment of memory because each recursion is stored in the stack memory.

     

    Recursion are of following types:

    1. Head Recursion
    2. Tail Recursion
  • Divide and Conquer Algorithm

    Divide and conquer algorithm is comprised of basically two parts:

    • Divide the problem into sub-problem of same type and solve the sub-problem recursively.
    • Combine the solution to the sub-problem into a solution to the original problem.
     
     Examples of Dynamic Programming are Quick Sort and Merge Sort.
  • Dynamic Programming Algorithm

    • The worked is based on memoization i.e, the algorithm remembers the past result and use them to find the new result.
    • Used for Optimization of problem to provide the best result.
  • Greedy Algorithm

    • We take the best we can without worrying about the future consequences.
    • We hope that choosing the local optimum solution at each step, will end up to global optimum solution. 
  • Brute Force

    • It tries all possibility until it find up the satisfactory result.

  • Randomize Algorithm 

    • Uses the random number at least once during the computation to make the decision.

Post a Comment

0 Comments