Skip to content

Maple - Christine#31

Open
Chrisss111 wants to merge 1 commit intoAda-C16:masterfrom
Chrisss111:master
Open

Maple - Christine#31
Chrisss111 wants to merge 1 commit intoAda-C16:masterfrom
Chrisss111:master

Conversation

@Chrisss111
Copy link

No description provided.

Copy link

@kyra-patton kyra-patton left a comment

Choose a reason for hiding this comment

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

🐶🐾 Nice work, Christine! I left one comment suggesting some refactoring to address an edge case, but overall it looks like you hit the learning goals for this project. Let me know what questions you have.

🟢

Comment on lines +8 to 10
Time Complexity: O(N + E)
Space Complexity: O(N)
"""

Choose a reason for hiding this comment

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

Comment on lines +20 to +23
if dislikes[0]:
start = 0
else:
start = 1

Choose a reason for hiding this comment

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

Consider an edge case where dislikes has multiple nodes at the beginning of the list that are disconnected from the graph. How might your refactor your code to address this edge case?

dogs.add(start)
group_1.add(start)

while len(queue):

Choose a reason for hiding this comment

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

🦴 Very nice BFS implementation!

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