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

Leaves - Sabrina #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Galaxylaughing
Copy link

I accidentally forked the C11 version.

Copy link

@CheezItMan CheezItMan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like it works and has a good set of helper methods. Well done. I only had one comment regarding handling a disconnected graph (where you might have 2 subgraphs which aren't connected at all.

puppies_count = dislikes.length()
return true if puppies_count <= 0

stack = [0]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might want to have to loop through each possible starting node, just in case of a disconnected graph.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants