Skip to content

Conversation

ZainabMalik5
Copy link

I have added a javaScript function for detecting cycles in the directed graph which is Kahn's algorithm. Please merge my PR.

Copy link
Collaborator

@appgurueu appgurueu left a comment

Choose a reason for hiding this comment

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

See my review for cycle.js, essentially the same points apply here. Also, separate the two things. cycle.js does not belong here. Per our naming convention, these file names should not be lowercase. The implementation of Kahn's algorithm given here is also likely needlessly inefficient since queue.shift() is a linear time operation. Try to use one of our linked queues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants