Kruskal’s Algorithm: Explanation, Example And Program

Kruskal’s Algorithm follows the Greedy Algorithm to construct a Minimum Spanning Tree for a connected, weighted, and undirected graph. This algorithm treats the graph as a forest and its vertices as an individual tree. The aim of this algorithm is to find a subset of the edges that forms a tree that includes every vertex … Read more

Prim’s Algorithm Explanation with Example

Prim’s algorithm uses the greedy approach to find a minimum cost spanning tree for a connected weighted undirected graph. The algorithm builds a tree that includes all vertex and a subset of the edges in such a way that the sum of all the edges weight in the tree is minimum. The major approach for … Read more

Difference between BFS and DFS Graph Traversal

Depth First Search (DFS) Depth First Search (DFS) algorithm traverses a graph in a depthward motion and uses a stack data structure to remember to get the next vertex to start a search when a dead end occurs in any iteration. Breadth First Search (BFS) Difference between BFS and DFS Breadth-First Search (BFS) Depth First … Read more

Graph Traversal Technique in Data Structure

Graph traversal is a technique to visit the each nodes of a graph G. It is also use to calculate the order of vertices in traverse process. We visit all the nodes starting from one node which is connected to each other without going into loop. Basically in graph it may happen some time visiters … Read more

Breadth First Search (BFS) Traversal in Data Structure

Breadth-first search graph traversal techniques use a queue data structure as an auxiliary data structure to store nodes for further processing. The size of the queue will be the maximum total number of vertices in the graph. It is a smart way to look through data organized in a graph. A graph is a collection … Read more

Graph representation in data structure

A graph is a non-linear data structure that consists of vertices and edges.Vertices are also known as nodes. Edges can be in order or not. An ordered pair (u, v) indicates that there is an edge from vertex u to vertex v in a directed graph. Also in directed graph (u,v) is not equal to … Read more

Graph and types of graph in Data Structure

A graph is an abstract data structure that is basically a collection of a finite set of vertices (also called nodes) and edges that connect these vertices. A Graph is also known as a non-linear data structure because we can insert data anywhere by following some defined rule anywhere. Definition We can define graph G … Read more

Most asked Python Interview Questions

Q1). What is pep8 in Python? why pep8 is important? Ans: PEP stands for Python Enhancement Proposal. We can Spell pep8 as PEP8 or PEP-8. It is a document that provides Guideline to improve the readability of Python Code. It was written by Guido van Rossum, Barry Warsaw, and Nick Coghlan in 2001. It was … Read more

Hi, Welcome back!
Forgot Password?
Don't have an account?  Register Now