Tutorials
Courses
Go Premium
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
Web Technologies
32.1K+ articles
DSA
20.0K+ articles
Misc
7.8K+ articles
Mathematical
5.1K+ articles
Arrays
4.2K+ articles
Graph
560+ articles
DFS
359+ articles
graph-cycle
58+ articles
disjoint-set
51+ articles
In-house
+ articles
union-find
54 posts
Recent Articles
Popular Articles
Merge details of students (Merging Details)
Last Updated: 05 March 2024
Bob, a teacher of St. Joseph School given a task by his principal to merge the details of the students where each element details[i] is a list of strings, where the first ...
read more
Graph
Picked
Geeks Premier League
DSA
union-find
Geeks Premier League 2023
Email Account Merging
Last Updated: 23 July 2025
Given a 2D array arr[][], where each element arr[i] is an array of strings representing an account, where the first element arr[i][0] is a name, and the rest of the elemen...
read more
Graph
Picked
DSA
union-find
disjoint-set
Check if given graph is connected or not after removal of ith node sequential
Last Updated: 23 July 2025
Given an undirected graph with N nodes, M edges given by array edges[][2] and permutation array A[] of size N which indicates the order in which each and every node of gra...
read more
Graph
Geeks Premier League
DSA
union-find
disjoint-set
Geeks Premier League 2023
Maximum Nodes removed to Keep the Graph Reachable
Last Updated: 23 July 2025
You and your Friend are given an undirected graph having 3 types of edges. A graph is called Reachable if starting from any node, you and your friend can reach all other n...
read more
Graph
Picked
Geeks Premier League
DSA
union-find
Geeks Premier League 2023
Extra Edge in a Directed Rooted Tree
Last Updated: 23 July 2025
Given a Directed rooted tree of N vertices and N-1 edges. But now your friend has added an extra edge in the tree. You have to find an edge that could have been added by y...
read more
Graph
Picked
Geeks Premier League
DSA
union-find
Geeks Premier League 2023
Find the size of the Largest connected GCD Component
Last Updated: 23 July 2025
Given an array arr of size N. Consider a graph formed using the given array where the graph has N vertices and the value of i'th vertices is arr[i] there is an edge betwee...
read more
Graph
Picked
Geeks Premier League
DSA
GCD-LCM
union-find
Geeks Premier League 2023
Extra Edge in an Undirected Tree
Last Updated: 23 July 2025
Given an undirected tree of N vertices and N-1 edges. But now a friend has added an extra edge to the tree. You have to find an edge that your friend could have added. If ...
read more
Graph
Picked
Geeks Premier League
DSA
union-find
Geeks Premier League 2023
Determining Word Equivalence between Arrays
Last Updated: 23 July 2025
Given two arrays A[] and B[] of strings and an array of pairs[] where each pair of words is equivalent and also follows transitive property (i.e. if x=y and y=z then x=z),...
read more
Picked
Geeks Premier League
DSA
union-find
disjoint-set
Map
Geeks Premier League 2023
Validate the Binary Tree Nodes
Last Updated: 23 July 2025
Given N nodes numbered from 0 to n-1, also given the E number of directed edges, determine whether the given nodes all together form a single binary tree or not.Examples:I...
read more
Graph
Picked
Geeks Premier League
DSA
Binary Tree
union-find
Geeks Premier League 2023
Graph Connectivity above Threshold value
Last Updated: 23 July 2025
Given two integers N and K, where N denotes the number of vertices in a Graph. There is an edge between two vertices u and v if there exists some z K: u % z ==0: v % z ==...
read more
Graph
Picked
Geeks Premier League
DSA
union-find
disjoint-set
Geeks Premier League 2023
Number of Critical and Pseudo-Critical edges
Last Updated: 23 July 2025
Given a weighted undirected graph with n vertices numbered from 0 to n - 1, and an array of edges where edges[i] = [u, v, weight] represents a bidirectional and weighted e...
read more
Graph
Picked
DSA
MST
union-find
Friendship Request Validation in a Network
Last Updated: 23 July 2025
You have a network of individuals, each labeled with a number from 0 to n - 1. Some individuals cannot be friends due to specific rules. You also have a list of friend req...
read more
Graph
DSA
union-find
Data Structures-Graph
Query-Based Array Transformation
Last Updated: 17 December 2023
Given an array arr[] of size N, initially, all the elements of arr are 0, you have to process q queries of the form "L R X" denoting that fill the array from index l to in...
read more
Picked
DSA
union-find
Island Connectivity for Q queries
Last Updated: 23 July 2025
Given an integer N denoting the number of disconnected islands from 1 to N. You have to process Q queries of the following types:Type 1 query: 0 u v = Connect islands u an...
read more
Graph
DSA
union-find
disjoint-set
DSU Full Form
Last Updated: 21 August 2023
DSU Full FormThe term DSU stands forDisjoint Set Union, in the context of Computer Science.What is DSU?A data structure that stores non overlapping or disjoint subset of e...
read more
Picked
DSA
union-find
disjoint-set
1
2
3
4
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !