Skip to content
Courses
DSA to Development
Get IBM Certification
Newly Launched!
Master Django Framework
Become AWS Certified
For Working Professionals
Interview 101: DSA & System Design
Data Science Training Program
JAVA Backend Development (Live)
DevOps Engineering (LIVE)
Data Structures & Algorithms in Python
For Students
Placement Preparation Course
Data Science (Live)
Data Structure & Algorithm-Self Paced (C++/JAVA)
Master Competitive Programming (Live)
Full Stack Development with React & Node JS (Live)
Full Stack Development
Data Science Program
All Courses
Tutorials
Data Structures & Algorithms
ML & Data Science
Interview Corner
Programming Languages
Web Development
CS Subjects
DevOps And Linux
School Learning
Practice
Build your AI Agent
GfG 160
Problem of the Day
Practice Coding Problems
GfG SDE Sheet
Contests
Accenture Hackathon (Ending Soon!)
GfG Weekly [Rated Contest]
Job-A-Thon Hiring Challenge
All Contests and Events
DSA
Practice Problems
Python
C
C++
Java
Courses
Machine Learning
DevOps
Web Development
System Design
Aptitude
Projects
Sign In
▲
Similar Topics
DSA
22.4k+ articles
Mathematical
7.7k+ articles
Arrays
6.4k+ articles
Strings
3.2k+ articles
Algorithms
2k+ articles
Tree
1.4k+ articles
Graph
940+ articles
Advanced Data Structure
580+ articles
DFS
340+ articles
disjoint-set
51 articles
union-find
54 posts
Popular Articles
Recent Articles
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 over
...read more
union-find
Picked
disjoint-set
DSA
The Earliest Moment When Everyone Become Friends
Last Updated: 24 March 2023
Given a group of N people, each having a unique ID value from 0 to (N - 1) and an array arr[] of M elements of the form {U, V, time} represe
...read more
Tree
Graph
Mathematical
graph-connectivity
union-find
graph-cycle
disjoint-set
Interview-Questions
DSA
Find number of closed islands in given Matrix
Last Updated: 22 February 2025
Given a binary matrix mat[][] of dimensions NxM such that 1 denotes the island and 0 denotes the water. The task is to find the number of cl
...read more
Graph
Algorithms
Matrix
BFS
DFS
union-find
Recursion
C++
Data Structures
Algorithms-Graph Traversals
Graph Traversals
C++ Programs
disjoint-set
DSA
Similar Topics
DSA
22.4k+ articles
Mathematical
7.7k+ articles
Arrays
6.4k+ articles
Strings
3.2k+ articles
Algorithms
2k+ articles
Tree
1.4k+ articles
Graph
940+ articles
Advanced Data Structure
580+ articles
DFS
340+ articles
disjoint-set
51+ articles
Minimum changes required to make two arrays identical
Last Updated: 02 September 2022
Given two arrays,[Tex]A[/Tex]and[Tex]B[/Tex]with n elements each. The task is to make these two arrays identical i:e, for each[Tex]1\leq i \
...read more
Arrays
Advanced Data Structure
Competitive Programming
union-find
DSA
Union-Find Algorithm | (Union By Rank and Find by Optimized Path Compression)
Last Updated: 14 December 2022
Check whether a given graph contains a cycle or not.Example:Input: Output: Graph contains Cycle.Input: Output: Graph does not contain Cycle.
...read more
Graph
Advanced Data Structure
union-find
DSA
Calculate number of nodes between two vertices in an acyclic Graph by Disjoint Union method
Last Updated: 05 March 2023
Given a connected acyclic graph, a source vertex and a destination vertex, your task is to count the number of vertices between the given so
...read more
Graph
union-find
DSA
Dynamic Connectivity | Set 1 (Incremental)
Last Updated: 06 June 2023
Dynamic connectivity is a data structure that dynamically maintains the information about the connected components of graph. In simple words
...read more
Graph
Advanced Data Structure
union-find
DSA
Find the number of Islands using Disjoint Set
Last Updated: 04 April 2025
Given ann x mgrid of'W'(Water) and'L'(Land), the task is to count the number of islands. An island is a group of adjacent'L'cells connected
...read more
Graph
Advanced Data Structure
graph-connectivity
union-find
DSA
Job Sequencing Problem using Disjoint Set
Last Updated: 27 March 2025
Given three arrays id[], deadline[], profit[], where each job i is associated with id[i], deadline[i], and profit[i]. Each job takes 1 unit
...read more
Accolite
Greedy
union-find
DSA
Disjoint Set Data Structures
Last Updated: 22 February 2025
A disjoint-set data structure is defined as one that keeps track of a set of elements partitioned into a number of disjoint (non-overlapping
...read more
Advanced Data Structure
union-find
DSA
Tarjan's off-line lowest common ancestors algorithm
Last Updated: 02 March 2022
Prerequisite : LCA basics, Disjoint Set Union by Rank and Path CompressionWe are given a tree(can be extended to a DAG) and we have many que
...read more
Advanced Data Structure
union-find
LCA
DSA
Kruskal's Minimum Spanning Tree using STL in C++
Last Updated: 27 March 2023
Given an undirected, connected and weighted graph, find Minimum Spanning Tree (MST) of the graph using Kruskal's algorithm.Input : Graph a
...read more
Bit Magic
Graph
STL
MST
union-find
DSA
Detect cycle in an undirected graph
Last Updated: 07 April 2025
Given an undirected graph, the task is to check if there is a cycle in the given graph.Examples:Input: V = 4, edges[][]= [[0, 1], [0, 2], [1
...read more
Amazon
Adobe
Oracle
Flipkart
Samsung
Graph
MakeMyTrip
BFS
DFS
union-find
graph-cycle
DSA
Union By Rank and Path Compression in Union-Find Algorithm
Last Updated: 22 April 2025
In the previous post, we introduced the Union-Find algorithm. We employed the union() and find() operations to manage subsets.Code Implemen
...read more
Graph
union-find
DSA
Introduction to Disjoint Set (Union-Find Algorithm)
Last Updated: 26 February 2025
Two sets are called disjoint sets if they don't have any element in common. The disjoint set data structure is used to store such sets. It s
...read more
Graph
Huawei
union-find
QA - Placement Quizzes-Data Interpretation
graph-cycle
Java-SecureRandom
TCS-coding-questions
B-Tree
DSA
Intellipaat
1
2
3
4
>>
Last
1
2
3
4
>>
Last
1
2
3
4
>>
Last
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 !