Some Important Algorithms

Classification :

Classification is a natural habit of huamnbeings. A house wife would classify her utensils, spices, sarees and a school student would classify his/her books, toys, pens and pencils etc. Knowledge has been classified into different categories such as History, Biology, Mathematics, Anthropology etc.


Similarly for convenience Math and computer algorithms have been classified into different categories such as


Math Algorithms:

These are algorithms developed as part of number theory (like checking primality etc., ), linear algebra, polynomials , geometry ( like creating convex-hull ) etc.,


Divide and conquer Algorithms:

These divide the problem into subproblems and after solving these simple subproblems, the solutions of subproblems are used to solve the actual problem.


Sorting Algorithms:

These are algorithms used to sort data. Depending on amount and type of data we select particular algorithm to sort the data.


Searching Algorithms:

These are algorithms used in searching data . Depending on whether data is sorted or not we select the algorithm to search the data.


Order Statistics:

These are algorithms used in finding kth order statistic ( kth smallest element ) in a given array.


Dynamic Programming Algorithms:

These also divide the problem into subproblems but here there are overlapping subproblems .So we solve each subproblem only once and store the result and use it in future when needed.

If the problem's optimal solution can be constructed from its sub problems' optimal solutions then the problem is said to have optimal substructure property.

If there is no optimal substructure property then we can not use the solutions to the sub problems to construct the solution of actual problem.


Greedy Algorithms:

These algorithms pick optimal choices at every step of the algorithm but finally the final solution obtained need not be optimal.


Graph Algorithms:

These algorithms are used in graphs to either traverse them or find shortest paths between nodes, find connected components, minimum spanning trees and many more.


There are many more categories like Quantum Algorithms, Bio Algorithms etc., which I plan to add to the list soon. In the mean time click on each category link on the left to go through the list of algorithms under that category.

Math Algorithms

  1. Prime Numbers
  2. GCD
  3. Binary Exponentiation
  4. Fibonacci sequence
  5. Fast Fourier Transform ( FFT ) ( Pending )

Divide and conquer Algorithms

  1. Sorting Algorithms

    1. Merge sort
    2. quick sort
  2. Searching Algorithm

    1. Binary search
  3. Order statistics Algorithms

    1. median finding
    2. Kth smallest number
  4. Some more divide and conquer algorithms

    1. Maximal-subarray problem ( pending )

    2. Strassen's Algorithm ( pending )

    3. Karatsuba algorithm ( pending )

Sorting Algorithms

  1. Bubble sort
  2. Insertion sort
  3. Linear sort
  4. Quick sort
  5. Merge sort
  6. counting sort
  7. Radix sort
  8. Heap sort
  9. Bucket sort
  10. External sort ( pending )

Searching Algorithms

  1. linear search
  2. binary search

Order statistics

  1. median finding
  2. kth smallest number

Dynamic Programming Algorithms

  1. Matrix chain multiplication
  2. Longest common subsequence
  3. Knapsack
  4. Edit distance
  5. Balancing brackets ( pending )

  6. Independent sets in trees ( pending )

Greedy Algorithms

  1. Dijkstra's Shortest path algorithm
  2. Kruskal's Algorithm
  3. Prim's Algorithm
  4. Activity selection ( pending )

  5. Huffman codes ( pending )

  6. Set cover Approximation ( pending )

Graph Algorithms

  1. Traversal Algorithms

    1. DFS
    2. BFS
  2. Shortest paths

    1. Dijkstra's Shortest path Algorithm
    2. Bellman Ford
    3. Floyd warshall
    4. Jhonson's algorithm
  3. Strongly connected components

    1. Kosaraju's algorithm
  4. MST

    1. Kruskal's algorithm
    2. Prim's algorithm
  5. Maximum Flow

    1. Ford Fulkerson ( pending )

    2. Dinic's algorithm ( pending )