WebClub-NITK / Hacktoberfest-2k21

Repository for Hacktoberfest-2k21
1 stars 7 forks source link

Topological sorting #7

Open Ashwin901 opened 3 years ago

Ashwin901 commented 3 years ago

Description

Given the number of courses n and an array of prerequisites , return the ordering of courses one should take to finish all the courses. prerequisites[i] = [a,b] indicates that course b must be taken before course a

Input:

4 [[1,0],[2,0],[3,1],[3,2]]

Output:

[0,2,1,3]

Details

Directory Structure

Create a folder topological-sorting under Algorithms folder. All the files should be placed inside this folder

Note

  1. Please claim the issue first by commenting here before starting to work on it.
  2. Once you are done with the task and have created a Pull Request, please tag @Ashwin901 to request a review.
sneaky-potato commented 3 years ago

Hi! I think I can do this, please assign me this issue

ikjot-2605 commented 3 years ago

@sneaky-potato you can start working on the issue now!

Akbhobhiya commented 3 years ago

Hi, I want to do this since it is not yet completed

Akbhobhiya commented 3 years ago

I made a pull request for the same please allow