Problem Description Given a weighted, directed and connected graph of V vertices and E edges, Find the shortest distance of all the vertex’s from the source vertex S. Note: If the Graph contains a...
Floyd Warshall
Problem Description The problem is to find the shortest distances between every pair of vertices in a given edge-weighted directed graph. The graph is represented as an adjacency matrix of size n*...
Minimal Spanning Tree
Problem Description Given a weighted, undirected and connected graph of V vertices and E edges. The task is to find the sum of weights of the edges of the Minimum Spanning Tree. geeksforgeeks So...
Dijkstra Algorithm
Problem Description Given a weighted, undirected and connected graph of V vertices and an adjacency list adj where adj[i] is a list of lists containing two integers where the first integer of each...
Number of Provinces
Problem Description Given an undirected graph with V vertices. We say two vertices u and v belong to a single province if there is a path from u to v or v to u. Your task is to find the number of ...
Graphs 101 - Part 2
Graphs 101: Part 1
Graphs 101 - Part 1
Graphs 101: Part 2
Detect Squares
This question is part of NeetCode150 series. Problem Description You are given a stream of points on the X-Y plane. Design an algorithm that: Adds new points from the stream into a data struc...
Multiply Strings
This question is part of NeetCode150 series. Problem Description Given two non-negative integers num1 and num2 represented as strings, return the product of num1 and num2, also represented as a s...
Plus One
This question is part of NeetCode150 series. Problem Description You are given a large integer represented as an integer array digits, where each digits[i] is the ith digit of the integer. The di...