Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
DSA in Python - Disjoint Set (Union-Find) | Path Compression + Union by Size/Rank | Part 158 [Hindi]
Play lesson

Data Structures and Algorithms with Python | Free DSA with Python Course - DSA in Python - Disjoint Set (Union-Find) | Path Compression + Union by Size/Rank | Part 158 [Hindi]

5.0 (2)
23 learners

What you'll learn

This course includes

  • 73.5 hours of video
  • Certificate of completion
  • Access on mobile and TV

Summary

Full Transcript

📘 Welcome to Part 158 of Code & Debug’s DSA Python Course! In this video, we dive into one of the most powerful data structures for graph problems – Disjoint Set Union (DSU), also known as Union-Find. Disjoint Set is widely used in problems related to connected components, cycle detection, and Minimum Spanning Trees (Kruskal’s Algorithm). 👨‍🏫 Here’s what we cover in this video: ✅ What is a Disjoint Set and where it’s used ✅ find() function with Path Compression for optimization ✅ union() with Union by Size strategy ✅ Full code walkthrough and working demo ✅ Time Complexity explanation – almost O(1) due to inverse Ackermann function ✅ Real-world examples of usage This foundational concept appears in many advanced graph problems, and mastering it is crucial for acing competitive programming and interviews. 📄 Full Playlist Sheet (All Questions in Order): https://docs.google.com/spreadsheets/d/1AWE15Fy3wD2iqu2vjK_R7cCiuvSsjYQclcdZmHpF66o/edit?usp=sharing 🎓 Enroll in the FREE Python DSA Course: https://codeanddebug.in/course/master-dsa-with-leetcode 🚀 For a complete journey from beginner to expert: https://codeanddebug.in/course/zero-to-hero-python-dsa Keep learning and stay consistent with Code & Debug. Like | Share | Subscribe & turn on the 🔔 for updates! #DisjointSet #UnionFind #PathCompression #UnionBySize #PythonDSA #GraphDSA #DSA2025 #CodeAndDebug #Part158 #ConnectedComponents #KruskalAlgorithm #GraphTheory

Course Hive

Continue this lesson in the app

Install CourseHive on Android or iOS to keep learning while you move.

Related Courses

FAQs

Course Hive
Download CourseHive
Keep learning anywhere