This is a C++ Program to find the connected components of the undirected graph. This can be done using depth first search algorithm. Here is source code of the C++ Program to Check Whether it is Weakly Connected or Strongly Connected for a Directed Graph. The C++ program is successfully compiled and run on a … Read more

This is a C++ Program to print odd levels of the tree. There are basically two functions in this method. One is to print all nodes at a given level (printGivenLevel), and other is to print level order traversal of the tree (printLevelorder). printLevelorder makes use of printGivenLevel to print nodes at all levels one … Read more

This is a C++ Program to solve a matching problem. Given N men and N women, where each person has ranked all members of the opposite gender in order of preference, marry the men and women together such that there are no two people of opposite gender who would both rather have each other than … Read more

This is a C++ Program to find shortest path for DAG using topological sorting. For a general weighted graph, we can calculate single source shortest distances in O(VE) time using Bellman–Ford Algorithm. For a graph with no negative weights, we can do better and calculate single source shortest distances in O(E + VLogV) time using … Read more

This is a C++ Program to find random linear extension of DAG. Linear extension is another term for finding topological sort of a graph. Here is source code of the C++ Program to Create a Random Linear Extension for a DAG. The C++ program is successfully compiled and run on a Linux system. The program … Read more

This is a C++ Program to solve a matching problem. Given N men and N women, where each person has ranked all members of the opposite gender in order of preference, marry the men and women together such that there are no two people of opposite gender who would both rather have each other than … Read more

This is a C++ Program to solve a matching problem. Given N men and N women, where each person has ranked all members of the opposite sex in order of preference, marry the men and women together such that there are no two people of opposite sex who would both rather have each other than … Read more

This is a C++ Program to find feedback arc set. This is the set which contains edges which when removed from the graph, graph becomes directed acyclic graph. Here is source code of the C++ Program to Remove the Edges in a Given Cyclic Graph such that its Linear Extension can be Found. The C++ … Read more

This is a C++ Program to check whether an undirected graph contains Eulerian Path. The criteran Euler suggested, 1. If graph has no odd degree vertex, there is at least one Eulerian Circuit. 2. If graph as two vertices with odd degree, there is no Eulerian Circuit but at least one Eulerian Path. 3. If … Read more

This is a C++ Program to check whether graph contains Eulerian Path. The criteran Euler suggested, 1. If graph has no odd degree vertex, there is at least one Eulerian Circuit. 2. If graph as two vertices with odd degree, there is no Eulerian Circuit but at least one Eulerian Path. 3. If graph has … Read more

advertisement

Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He is Linux Kernel Developer & SAN Architect and is passionate about competency developments in these areas. He lives in Bangalore and delivers focused training sessions to IT professionals in Linux Kernel, Linux Debugging, Linux Device Drivers, Linux Networking, Linux Storage, Advanced C Programming, SAN Storage Technologies, SCSI Internals & Storage Protocols such as iSCSI & Fiber Channel. Stay connected with him @
LinkedIn | Youtube | Instagram | Facebook | Twitter