Skip to content
Pencil Programmer
  • Online Compiler
    • Python
    • R
  • Algorithms
  • C++
    • C++ Tutorials
    • C++ Programs
  • C
  • Python
    • Python Tutorials
    • Python Programs
  • Java
    • Java Programs
  • Interview
    • C++
    • DBMS
  • More
  • Online Compiler
    • Python
    • R
  • Algorithms
  • C++
    • C++ Tutorials
    • C++ Programs
  • C
  • Python
    • Python Tutorials
    • Python Programs
  • Java
    • Java Programs
  • Interview
    • C++
    • DBMS
  • More

Algorithms

  1. Home>
  2. 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 Sort – O(n2)
  3. Counting Sort – O(n + k)
  4. Radix Sort – O(n*w)
  5. Quick Sort – Θ(nlog(n))
  6. Shell Sort – O(n²)
  7. Bubble Sort – O(n2)
  8. Topological Sort – O(V+E)

Search Algorithms

  1. Linear Search – O(n)
  2. Binary Search – O(log(n))

Greedy Algorithm

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

Graph Algorithms

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

Backtracking

  1. What is Backtracking?
  2. Ford Fulkerson Algorithm – O(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 Algorithm – O(V +Elog(V))
  5. Bellman-Ford Algorithm – O(VE)
  6. Matrix Chain Multiplication
  7. Rod Cutting Problem

Read more articles on Algorithms here.

Sharing is Caring

Advertisement

  • About Us
  • Contact Us
  • Privacy Policy
  • Sitemap
2022 @pencilprogrammer.com DigitalOcean Referral Badge