There are n cities and m edges connected by some number of flights. You are given an array of flights

Continue reading## G-37: Path With Minimum Effort

You are a hiker preparing for an upcoming hike. You are given heights, a 2D array of size rows x

Continue reading## G-36: Shortest Distance in a Binary Maze

Problem Statement: Given an n * m matrix grid where each element can either be 0 or 1. You need

Continue reading## Articulation Point in Graph: G-56

Problem Statement: Given an undirected connected graph with V vertices and adjacency list adj. You are required to find all

Continue reading## Bridges in Graph – Using Tarjan’s Algorithm of time in and low time: G-55

Problem Statement: There are n servers numbered from 0 to n – 1 connected by undirected server-to-server connections forming a

Continue reading## Strongly Connected Components – Kosaraju’s Algorithm: G-54

Problem Statement: Given a Directed Graph with V vertices (Numbered from 0 to V-1) and E edges, Find the number

Continue reading## Most Stones Removed with Same Row or Column – DSU: G-53

Problem Statement: There are n stones at some integer coordinate points on a 2D plane. Each coordinate point may have

Continue reading## Making a Large Island – DSU: G-52

Problem Statement: You are given an n x n binary grid. A grid is said to be binary if every

Continue reading## Number of Islands – II – Online Queries – DSU: G-51

Problem Statement: You are given an n, m which means the row and column of the 2D matrix, and an

Continue reading## Number of Provinces – Disjoint Set: G-48

Problem Statement: Given an undirected graph with V vertices. We say two vertices u and v belong to a single

Continue reading