Skip to content

Latest commit

 

History

History

AlgoTypes

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

Types of Algorithms

  • Backtracking Algorithm

    • recursive problem solving approach
    • I come up with N number of solution
    • If the first solution does not solve my problem I go back
    • I try the second solution and so forth
    • I remove the first solution
    • Playing soduku you find 4 is in the row, column and box therefore you backtrack and check 5
    • Trying to find your way out in a maze
  • Brute Force Algorithm

    • Check every possible solution for the problem to be solved
  • Divide And Conquer Algorithm

    • Divide the problem into sub-problems and solve each sub-problem independently
    • i.e. Binary Search
  • Dynamic Programming Algorithm

    • function X generates the output Y
    • I store the result of Y and use it in function D
  • Greedy Algorithm

    • Always chooses the best solution
    • Solution is built piece by piece
    • The subsequent piece chosen by the algorithm is usually the most obvious
    • Examples in Various DS:
  • Recursive Algorithm

    • an algorithm which calls itself
    • i.e. factorial