Adjacency List
Adjacency list is used to represent a graph using array and linked list
Adjacency list is used to represent a graph using array and linked list
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.
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.
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.
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.
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.
This post covers Dijkstra's Algorithm for finding the shortest paths in a graph, with code examples and explanations.
The program is to return a deep copy of the graph, preserving the structure and values of its nodes.
Reverse a directed graph so that the incoming edges will be converted to outgoing edges betwwen the same nodes.
Calculating the longest path from a given source in a Directed Acyclic Graph (DAG) with weighted edges.
The multistage graph problem is finding the path with minimum cost from source to sink.
1. Easy Level
Practice problems for Graphs to help you understand the concepts better.
Solve the Rotten Oranges problem using Breadth-First Search (BFS) to determine the minimum time required for all fresh oranges to rot.