Skip to content

UnionFind/Disjoint Set #215

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
3 of 7 tasks
TheDoctor561 opened this issue Oct 3, 2022 · 2 comments
Open
3 of 7 tasks

UnionFind/Disjoint Set #215

TheDoctor561 opened this issue Oct 3, 2022 · 2 comments
Assignees
Labels
Assigned Issue is assigned HACKTOBERFEST This issue is applicable for Hacktoberfest 2022

Comments

@TheDoctor561
Copy link

TheDoctor561 commented Oct 3, 2022


Title: Union Find
Directory: Graph
Name: Daniel Yu-cua


Define You:

  • Hacktoberfest2022 Participant
  • Contributor

Problem

Write to program in Python to implement a Disjoint set also known as Union Find. A disjoint set is a data structure that stores a collection of "disjoint" (non-overlapping) sets. This data structure is useful to determine whether two vertices of a graph belong to the same component, or whether an edge between them would result in a cycle. It is a key component in implementing Kruskal's algorithm to find the minimum spanning tree.

Type of change

What sort of change have you made:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, local variables)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Input:

UnionFind(5)
union(1,2)
union(4,5) 
isConnected(1,2)
isConnected(3,4) 

Output:

1 2 3 4 5 
1-2 3 4 5 
1-2 3 4-5
True
False

@prathimacode-hub Please assign me this issue, I'll be contributing as a Hacktoberfest 2022 participant.

@welcome
Copy link

welcome bot commented Oct 3, 2022

Hello there! 👋🏻 Welcome to the PyAlgo-Tree! 🚀⚡️
Thank you and congrats 🎉 for opening your very first issue in this project. Please adhere to our Code of Conduct. 👍🏻 You may submit a PR if you like, make sure to follow our Pull Request Template.
Feel free to get in touch with me through social media handles. Hope to see you there!😄

@prathimacode-hub
Copy link
Owner

Issue assigned to @TheDoctor561

@prathimacode-hub prathimacode-hub added Assigned Issue is assigned HACKTOBERFEST This issue is applicable for Hacktoberfest 2022 labels Oct 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Assigned Issue is assigned HACKTOBERFEST This issue is applicable for Hacktoberfest 2022
Projects
None yet
Development

No branches or pull requests

2 participants