Skip to content
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

Add Disjoint Union Algorithm #215

Closed
ZigRazor opened this issue Sep 30, 2022 · 10 comments
Closed

Add Disjoint Union Algorithm #215

ZigRazor opened this issue Sep 30, 2022 · 10 comments
Assignees
Labels
core something about core development Development of new Functionalities enhancement New feature or request good first issue Good for newcomers hacktoberfest hacktoberfest issue

Comments

@ZigRazor
Copy link
Owner

Implementation of Disjoint union algorithm to find connected components in graph efficently.

@ZigRazor ZigRazor added enhancement New feature or request good first issue Good for newcomers development Development of new Functionalities core something about core hacktoberfest hacktoberfest issue labels Sep 30, 2022
@ZigRazor ZigRazor added this to the Algorithm Implementation milestone Sep 30, 2022
@hraj43
Copy link

hraj43 commented Sep 30, 2022

hi @ZigRazor i would love to solve this problem...will you provide this to me?

@ZigRazor
Copy link
Owner Author

Yes, I assign it to you @harshraj438524 !

@ZigRazor
Copy link
Owner Author

@harshraj438524 are you working on it?

@ZigRazor
Copy link
Owner Author

ZigRazor commented Jul 4, 2023

Deassigned due to inactivity

@Happylinzy
Copy link

I would like to take this request. If I understand it correctly, the algorithm is to implement a union-find algorithm on the graph in Graph.cpp

@ZigRazor
Copy link
Owner Author

Yes, I will assign it to you

@Happylinzy
Copy link

What is the expected output of union find algorithm?

Here is what I think:
If we want to decide if two nodes are in the same connected components, we could maintain a union find data structure while construcing the graph. Then when the function for example isInSameConnectedComponent called, it directly checks the stored map to get the result.

Then the the modification to the union find map is enbedded into add edge, delete edge method.

@Happylinzy
Copy link

In addition, I found that functions used for union find have been implemented as setFind, setUnion in Graph.hpp :).

@ZigRazor
Copy link
Owner Author

Ok, so we can close this issue?

@Happylinzy
Copy link

Yes. I think we can close it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core something about core development Development of new Functionalities enhancement New feature or request good first issue Good for newcomers hacktoberfest hacktoberfest issue
Projects
None yet
Development

No branches or pull requests

3 participants