Articles for author: Harshit Srivastava

Spanning Tree

A spanning tree in data structures is a sub-graph, that contains all the vertices of a graph. A spanning tree may or may not be weighted, a spanning tree does not have cycles and it cannot be disconnected. The spanning tree has a minimal set of edges. A single connected graph can have multiple spanning ...

Top View of Binary Tree

The top view of a binary tree consists of the set of nodes that are visible when the tree is viewed from the top. We are given a binary tree and we have to print the top view of it. The output nodes must be printed starting from the left-most horizontal level to the rightmost ...