C++ Programming – 0-1 Knapsack Problem – Dynamic Programming simple solution is to consider all subsets of items and calculate the total weight and value
C++ programming
C++ Algorithm – Topological Sorting – Graph Algorithms – Topological sorting for Directed Acyclic Graph (DAG) is a linear ordering of vertices.
C++ Programming -To check if a given number is Fibonacci number – A simple way is to generate Fibonacci numbers until the generated number is greater
C++ Algorithm – Prim’s Minimum Spanning Tree (MST) – Minimum spanning tree We have discussed Kruskal’s algorithm for Minimum Spanning Tree.
C++ Algorithm – Detect cycle in an undirected graph – Graph Algorithms – Given an undirected graph, how to check if there is a cycle in the graph
Shortest Paths – C/C++ – Dijkstra’s shortest path algorithm – Given a graph and a source vertex in graph, find shortest paths from source to all vertices
C++ Programming – Print all possible combinations of r elements in a given array of size n – Mathematical Algorithms – Given an array of size n, and r is 2.
C++ Programming – Min Cost Path – Dynamic Programming – the MCP problem has both properties of a dynamic programming problem. Like other typical DP problems,
C++ Programming Edit Distance – Dynamic Programming – Idea is process all characters one by one staring from either from left or right sides of both strings
C++ Programming-Backtracking Set 6 (Hamiltonian Cycle) – Backtracking – Hamiltonian Path in an undirected graph is a path that visits each vertex exactly.