📄️ Practice Problems
Practice problems for Graphs to help you understand the concepts better.
🗃️ Shortest Path Algorithms
5 items
📄️ Prim's Algorithm
Prim's algorithm is a greedy algorithm that finds the Minimum Spanning Tree (MST)
📄️ Tarjan's Algorithm
Tarjan's algorithm is an efficient method for finding strongly connected components in a directed graph.
📄️ Practice Problems
1. Easy Level
📄️ Adjacency List
Adjacency list is used to represent a graph using array and linked list
📄️ Adjacency matrix
An adjacency matrix is a 2D array used to represent a graph, where each cell (i, j) is set to 1 if there's an edge from node i to node j, and 0 otherwise.
📄️ Introduction to Disjoint Set Union
The Disjoint Set Union (DSU) algorithm efficiently manages dynamic connectivity and union-find operations.
📄️ Johnson's Algorithm
In this blog post, we'll explore Johnson's Algorithm, a method to find the shortest paths between all pairs of nodes in a graph, even with negative weights.
📄️ Longest Path in DAG
Calculating the longest path from a given source in a Directed Acyclic Graph (DAG) with weighted edges.
📄️ PageRank Algorithm
In this blog post, we'll explore the PageRank algorithm, a method used to rank web pages based on their link structure.
📄️ Ant Colony Optimization
In this post, we'll explore the Ant Colony Optimization (ACO) algorithm, applied to solving the Travelling Salesman Problem (TSP) using a probabilistic and pheromone-based approach.
📄️ Breadth-First Search
In this blog post, we'll explore Breadth-First Search (BFS), a graph traversal algorithm used to explore vertices and edges level by level in a graph.
📄️ Bipartite-graph
A bipartite graph is a graph whose vertices can be divided into two disjoint sets such that no two vertices within the same set are adjacent.
📄️ Depth-First Search
In this blog post, we'll explore Depth-First Search (DFS), a graph traversal algorithm used to explore vertices and edges by going as deep as possible before backtracking.
📄️ Depth-First Search (DFS) Using Java
In this blog post, we'll explore Depth-First Search (DFS) using Java, a graph traversal algorithm used to explore vertices and edges by going as deep as possible before backtracking.
📄️ Dijkstra's Algorithm
In this blog post, we'll explore Dijkstra's Algorithm, an efficient method to find the shortest path from a source to all other nodes in a graph.
📄️ Eulerian Graphs
This post explores Eulerian graphs, their properties, and algorithms for detecting and constructing Eulerian paths and circuits.
📄️ Flood Fill Algorithm
In this blog post, we'll explore the Flood Fill Algorithm, a popular technique used in computer graphics for determining connected regions, such as filling areas in images and solving puzzles like the paint bucket tool in graphics editing software.
📄️ Floyd's-Algorithm
In this blog post, we'll explore the Floyd's-Algorithm, an efficient method to implement all pair shortest paths
📄️ Graph-cloning
The program is to return a deep copy of the graph, preserving the structure and values of its nodes.
📄️ Graph Coloring
In this document, we explore the graph coloring problem and provide a C implementation using a greedy algorithm.
📄️ Graph-reversal
Reverse a directed graph so that the incoming edges will be converted to outgoing edges betwwen the same nodes.
📄️ Hopcroft-Karp Algorithm
In this blog post, we'll explore the Hopcroft-Karp algorithm, an efficient method for finding the maximum matching in a bipartite graph.
📄️ Kahn's Algorithm
In this blog post, we will delve into Kahn's Algorithm, an efficient method for topological sorting of a directed acyclic graph (DAG). This algorithm provides a way to find a linear ordering of vertices such that for every directed edge u → v, vertex u comes before vertex v.
📄️ Kosaraju's Algorithm
In this blog post, we'll explore Kosaraju's Algorithm, an efficient algorithm used to find all Strongly Connected Components (SCCs) in a directed graph.
📄️ Kruskal's Algorithm
In this blog post, we'll explore Kruskal's Algorithm, a greedy algorithm used to find the Minimum Spanning Tree in a graph.
📄️ Minimum Spanning Tree
In this blog post, we'll explore Minimum Spanning Tree (MST) algorithms, specifically Prim's and Kruskal's algorithms, which are used to find the minimum cost spanning tree in a weighted graph.
📄️ Warshall's-Algorithm
In this blog post, we'll explore the Warshall's-Algorithm, an efficient method to Compute the transitive closure of a given directed graph