×
Home Discussions Write at Opengenus IQ
×
  • DSA Cheatsheet
  • HOME
  • Track your progress
  • Deep Learning (FREE)
  • Join our Internship 🎓
  • RANDOM
  • One Liner

Graph Algorithms

Graph algorithms are algorithms that work over graph data structures and are able to solve certain problems efficiently and intuitively. It is the basis of features used by billions of people like Facebook's graph API, friend recommendations, Google's knowledge graph and many others.

Graph Algorithms

Boruvka Minimum Spanning Tree

Borůvka's algorithm is an algorithm for finding a minimum spanning tree in a graph for which all edge weights are distinct, or a minimum spanning forest in the case of a graph that is not connected.

Alexa Ryder Alexa Ryder
Graph Algorithms

Prim Minimum Spanning Tree Algorithm

Prim's algorithm is a greedy algorithm that finds a minimum spanning tree for a weighted undirected graph. It finds a subset of the edges that forms a tree that includes every vertex,

Alexa Ryder Alexa Ryder
Graph Algorithms

Kruskal Minimum Spanning Tree Algorithm

Kruskal's algorithm is a minimum-spanning-tree algorithm which finds an edge of the least possible weight that connects any two trees in the forest. It is a greedy algorithm in graph theory as it finds a minimum spanning tree for a connected weighted graph adding increasing cost arcs at each step

Alexa Ryder Alexa Ryder
Graph Algorithms

What is a Minimum Spanning Tree?

A minimum spanning tree (MST) or minimum weight spanning tree is a subset of the edges of a connected, edge-weighted directed or undirected graph that connects all the vertices together, without any cycles and with the minimum possible total edge weight.

Alexa Ryder Alexa Ryder
Graph Algorithms

Shortest Path Faster Algorithm: Finding shortest path from a node

The Shortest Path Faster Algorithm (SPFA) is an improvement of the Bellman–Ford algorithm which computes single-source shortest paths in a weighted directed graph. The algorithm is believed to work well on random sparse graphs. SPFA Fanding Dung.

Alexa Ryder Alexa Ryder
Graph Algorithms

Bellman-Ford Algorithm: Finding shortest path from a node

Bellman-Ford Algorithm is an algorithm for single source shortest path where edges can be negative (but if there is a cycle with negative weight, then this problem will be NP). The credit of Bellman-Ford Algorithm goes to Alfonso Shimbel, Richard Bellman, Lester Ford and Edward F. Moore.

Alexa Ryder Alexa Ryder
Graph Algorithms

Floyd-Warshall Algorithm: Shortest path between all pair of nodes

Floyd-Warshall Algorithm is an algorithm based on dynamic programming technique to compute the shortest path between all pair of nodes in a graph. The credit of Floyd-Warshall Algorithm goes to Robert Floyd, Bernard Roy and Stephen Warshall.

Alexa Ryder Alexa Ryder
Graph Algorithms

Dijkstra's algorithm: Finding shortest path between all nodes

Dijkstra's algorithm is an algorithm for finding the shortest paths between nodes in a graph. Dijkstra's algorithm is applicable for: Both directed and undirected graphs, All edges must have nonnegative weights, Graph must be connected

Alexa Ryder Alexa Ryder
Graph Algorithms

Breadth First Search

Breadth-first search (BFS) algorithm is an algorithm for traversing or searching tree or graph data structures. One starts at the root (selecting some arbitrary node as the root in the case of a graph) and explores along adjacent nodes and proceeds recursively.

Alexa Ryder Alexa Ryder
Graph Algorithms

Fleury’s Algorithm: Finding Eulerian tours in a graph

Fleury's algorithm is a simple algorithm for finding Eulerian paths or tours. It proceeds by repeatedly removing edges from the graph in such way, that the graph remains Eulerian.

Alexa Ryder Alexa Ryder
Graph Algorithms

What is a Euler or Eulerian tour?

An Euler tour or Eulerian tour in an undirected graph is a tour/ path that traverses each edge of the graph exactly once. Graphs that have an Euler tour are called Eulerian graphs.

Alexa Ryder Alexa Ryder
Graph Algorithms

Find articulation points or cut vertices in a graph

Find articulation point or cut vertices in a graph. A vertex in an undirected connected graph is an articulation point or cut vertex if and only if removing it, and the edges connected to it, splits the graph into multiple components. Hint: Apply Depth First Search on a graph.

Alexa Ryder Alexa Ryder
Graph Algorithms

Find cut edges in a graph

Find cut edges in a graph in linear time complexity using Depth First Search. A cut edge e = uv is an edge whose removal disconnects u from v. There are two key observations to solve this problem.

Alexa Ryder Alexa Ryder
Graph Algorithms

Depth First Search

Depth-first search (DFS) algorithm is an algorithm for traversing or searching tree or graph data structures. One starts at the root (selecting some arbitrary node as the root in the case of a graph) and explores as far as possible along each branch before backtracking.

Alexa Ryder Alexa Ryder
OpenGenus IQ © 2025 All rights reserved â„¢
Contact - Email: team@opengenus.org
Primary Address: JR Shinjuku Miraina Tower, Tokyo, Shinjuku 160-0022, JP
Office #2: Commercial Complex D4, Delhi, Delhi 110017, IN
Top Posts LinkedIn Twitter
Android App
Apply for Internship