C++ Program to Construct an Expression Tree for a Postfix Expression

This is a C++ Program to create an expression tree and print the various traversals using postfix expression. Here is source code of the C++ Program to Construct an Expression Tree for a Postfix Expression. The C++ program is successfully compiled and run on a Linux system. The program output is also shown below. #include … Read more

advertisement

C++ Program to Implement Double Order Traversal of a Binary Tree

This is a C++ Program to print the double order traversal of the given tree. Recurse through: 1. Visit root of (sub)tree. 2. Visit left sub-tree. 3. Revisit root of (sub)tree. 4. Visit right sub-tree. Here is source code of the C++ Program to Implement Double Order Traversal of a Binary Tree. The C++ program … Read more

advertisement

C++ Program to Implement Dijkstra’s Algorithm Using Queue

This is a C++ Program to implement Dijkstra’s Shortest path algorithm using Queue. Here is source code of the C++ Program to Implement Dijkstra’s Algorithm Using Queue. The C++ program is successfully compiled and run on a Linux system. The program output is also shown below. #include <cstdio>#include <queue>#include <vector>#include <iostream> using namespace std; #define MAX 100001#define … Read more

advertisement

C++ Program to Check the Connectivity of Directed Graph Using BFS

This is a C++ Program to check the connectivity of directed graph using BFS. Here is source code of the C++ Program to Check the Connectivity of Directed Graph Using BFS. The C++ program is successfully compiled and run on a Linux system. The program output is also shown below. /* * C++ Program to Check … Read more

advertisement

C++ Program to Find the Connected Components of an UnDirected Graph

This is a C++ Program to find the connected components of the undirected graph. This can be done using depth first search Here is source code of the C++ Program to Find the Connected Components of an UnDirected Graph. The C++ program is successfully compiled and run on a Linux system. The program output is … Read more

advertisement

C++ Program to Check Whether an Input Binary Tree is the Sub Tree of the Binary Tree

This is a C++ Program to check whether tree is subtree of another tree. Given two binary trees, check if the first tree is subtree of the second one. A subtree of a tree T is a tree S consisting of a node in T and all of its descendants in T. The subtree corresponding … Read more

advertisement

C++ Program to Use the Bellman-Ford Algorithm to Find the Shortest Path Between Two Vertices Assuming that Negative Size Edges Exist in the Graph

This is a C++ Program to find the shortest path algorithm using Bellman-Ford algorithm. This algorithm also entertains negative edge weights. Here is source code of the C++ Program to Use the Bellman-Ford Algorithm to Find the Shortest Path Between Two Vertices Assuming that Negative Size Edges Exist in the Graph. The C++ program is … Read more

advertisement

C++ Program to Create a Balanced Binary Tree of the Incoming Data

This is a C++ Program to create a balanced binary tree. In computer science, a self-balancing (or height-balanced) binary search tree is any node-based binary search tree that automatically keeps its height (maximal number of levels below the root) small in the face of arbitrary item insertions and deletions. Here is source code of the … Read more

advertisement
Manish Bhojasia - Founder & CTO at Sanfoundry
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