Skip to content

Conversation

SniperBuddy101
Copy link

No description provided.

Copy link

@shardul-shah shardul-shah left a comment

Choose a reason for hiding this comment

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

@yangshun +1 on this PR. This is the mistake I also noticed, which we discussed earlier today, and which you agreed was a mistake.

Reasoning: Topological sort uses BFS and a queue. If we append to the back (index -1) of the queue, we should pop from the front of the queue - index 0, that is. queue.popleft() (since we use deque).

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