TheAlgorithms / JavaScript

Algorithms and Data Structures implemented in JavaScript for beginners, following best practices.
https://the-algorithms.com/language/javascript
GNU General Public License v3.0
32.19k stars 5.52k forks source link

Added topological sorting algorithms #1677

Open RaviSadam opened 2 months ago

RaviSadam commented 2 months ago

Description

Topological sorting for graphs implemented in both iterative(Kahn's Algo) and recursive approaches.

Files added

TopoSortIterative.js: Topo sort implementation in iterative approach TopoSortIterative.test.js: Corresponding test cases for topo sort in iterative approach TopoSortRecursive.js: Topo sort implementation in recursive approach TopoSortIterative.test.js: Corresponding test cases for topo sort in recursive approach

codecov-commenter commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 85.00%. Comparing base (9010481) to head (19d0d8f).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1677 +/- ## ========================================== + Coverage 84.65% 85.00% +0.34% ========================================== Files 378 379 +1 Lines 19744 19778 +34 Branches 2951 2972 +21 ========================================== + Hits 16715 16812 +97 + Misses 3029 2966 -63 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

appgurueu commented 2 months ago

It looks like you forgot to push? You've resolved a bunch of conversations (I'm not unresolving them for now), but I don't see the corresponding changes.