Algorithms

Learn the Algorithm of Search, Sort, Dynamic Programming, Backtracking, Greedy algorithm, Graph algorithms, etc with programming examples.

Sorting Algorithms

  1. Merge Sort O(nlog(n))
  2. Insertion SortO(n2)
  3. Counting SortO(n + k)
  4. Radix SortO(n*w)
  5. Quick SortΘ(nlog(n))
  6. Shell Sort O(n²)
  7. Bubble SortO(n2)
  8. Topological SortO(V+E)

Search Algorithms

  1. Linear SearchO(n)
  2. Binary SearchO(log(n))

Greedy Algorithm

  1. Job Sequencing with Deadlines Algorithm
  2. Fractional Knapsack Problem | Greedy Algorithm

Graph Algorithms

  1. Breadth-First SearchO(V+E)
  2. Depth First SearchO(V+E)
  3. Inorder Traversal
  4. Inorder, Preorder & Postorder Tree Traversal
  5. Shortest Path in Unweighted Undirected Graph using BFSO(V+E)
  6. Shortest Path in Unweighted Undirected Graph using DFSO(V+E)
  7. Shortest Path in Weighted Directed Graph using Bellman-Ford algorithmO(VE)
  8. Detect Cycle in a Directed GraphO(V+E)
  9. Prim’s Minimum Spanning TreeO(E*log(E))

Backtracking

  1. What is Backtracking?
  2. Ford Fulkerson AlgorithmO(fE)
  3. N Queen Problem
  4. Subset Sum Problem
  5. Graph Coloring Problem
  6. Sudoku
  7. Combination of Factors
  8. Find Shortest Path in a Maze
  9. Hamiltonian Cycle

Dynamic Programming

  1. What is Dynamic Programming
  2. 01 Knapsack Problem using Dynamic Programming
  3. Coin Change Problem
  4. Dijkstra’s Shortest Path AlgorithmO(V +Elog(V))
  5. Bellman-Ford AlgorithmO(VE)
  6. Matrix Chain Multiplication
  7. Rod Cutting Problem

Read more articles on Algorithms here.