Welcome To Tutorialspoint.dev
Officially launched 18th May 2019

# Total number of Spanning Trees in a Graph

If a graph is a complete graph with n vertices, then total number of spanning trees is n(n-2) where n is the number of nodes in the graph. In complete graph, the task...

# Kruskal’s Minimum Spanning Tree Algorithm Greedy Algo-2

What is Minimum Spanning Tree? Given a connected and undirected graph, a spanning tree of that graph is a subgraph that is a tree and connects all the vertices togeth...

# Minimum Product Spanning Tree

Given a connected and undirected graph, a spanning tree of that graph is a subgraph that is a tree and connects all the vertices together. A single graph can have man...

# Reverse Delete Algorithm for Minimum Spanning Tree

Reverse Delete algorithm is closely related to Kruskal&#x2019;s algorithm. In Kruskal&#x2019;s algorithm what we do is : Sort edges by increasing order of their weigh...

# Check if a given graph is tree or not

Write a function that returns true if a given undirected graph is tree and false otherwise. For example, the following graph is a tree. But the following graph is n...

# Kruskal’s Minimum Spanning Tree using STL in C++

Given an undirected, connected and weighted graph, find Minimum Spanning Tree (MST) of the graph using Kruskal&#x2019;s algorithm. Input : Graph as an array of ed...

# Check whether given degrees of vertices represent a Graph or Tree

Given the number of vertices and the degree of each vertex where vertex numbers are 1, 2, 3,&#x2026;n. The task is to identify whether it is a graph or a tree. It ma...

# Print a Binary Tree in Vertical Order Set 2 (Map based Method)

Given a binary tree, print it vertically. The following example illustrates vertical order traversal. 1 / 2 3 / / ...

# Vertical Sum in a given Binary Tree Set 1

Given a Binary Tree, find the vertical sum of the nodes that are in the same vertical line. Print all sums through different vertical lines. Examples: 1 / ...

# Clone a Binary Tree with Random Pointers

Given a Binary Tree where every node has following structure. struct node { int key; struct node *left,*right,*random; } The random pointer points to any ...