Skip to content

Earth - Ringo#12

Open
ringolingo wants to merge 1 commit intoAda-C14:masterfrom
ringolingo:master
Open

Earth - Ringo#12
ringolingo wants to merge 1 commit intoAda-C14:masterfrom
ringolingo:master

Conversation

@ringolingo
Copy link

No description provided.

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.

Nice work Ringo, good BFS solution. Well done.

Comment on lines +1 to 6
# Time complexity: in a breadth first search, each node (N) must be visited
# and each edge (E) must be checked, so the time involved is O(N+E)
# Space complexity: in the worst case scenario, q will contain every node
# in dislikes, so space is O(N)

def possible_bipartition(dislikes)

Choose a reason for hiding this comment

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

👍

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