Skip to content

Conversation

@ArpitaHanjagi
Copy link
Contributor

Topological Sort is an ordering of the vertices of a Directed Acyclic Graph (DAG) such that for every directed edge u → v, vertex u comes before v in the order.

Used in task scheduling, course prerequisites, and build systems.

Cannot be performed if the graph contains a cycle.

Common algorithms: Kahn’s Algorithm (BFS) and DFS-based approach.

Copilot AI review requested due to automatic review settings October 20, 2025 17:43
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request introduces a topological sort algorithm implementation along with multiple new algorithm implementations across graph algorithms, dynamic programming, machine learning, and mathematics categories. The PR adds implementations for fundamental algorithms including topological sort (Kahn's algorithm), various graph traversal algorithms, dynamic programming solutions, and machine learning models.

Key Changes

  • Implementation of topological sort algorithm using Kahn's algorithm for directed acyclic graphs
  • Addition of multiple graph algorithms (BFS, DFS, Dijkstra, Bellman-Ford, Floyd-Warshall, Kruskal's MST, Hamiltonian cycle, bridge detection)
  • Dynamic programming implementations (knapsack, LCS, LIS, coin change, subset sum, minimum path sum, matrix chain multiplication)
  • Machine learning algorithms (gradient boosting, various documentation files)
  • Mathematics algorithms (extended Euclidean, Catalan numbers, bisection method, etc.)

Reviewed Changes

Copilot reviewed 138 out of 211 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
graph_algorithms/topological_sort.r Implements Kahn's algorithm for topological sorting of DAGs
graph_algorithms/kruskal_mst.r Kruskal's MST algorithm with union-find data structure
graph_algorithms/dijkstra_shortest_path.r Dijkstra's algorithm with priority queue implementation
graph_algorithms/bellman_ford_shortest_path.r Bellman-Ford algorithm supporting negative weights
graph_algorithms/floyd_warshall.r All-pairs shortest path algorithm using R6 classes
graph_algorithms/depth_first_search.r DFS implementation with recursive and iterative versions
graph_algorithms/breadth_first_search.r BFS with shortest path and distance finding utilities
graph_algorithms/bridge_detector.r Tarjan's algorithm for finding bridges in graphs
graph_algorithms/hamilitonian_cycle.r Backtracking algorithm for Hamiltonian cycle detection
dynamic_programming/*.r Multiple DP algorithm implementations
machine_learning/gradient_boosting.r Gradient boosting regressor with R6 classes
mathematics/*.r Various mathematical algorithm implementations
documentation/.md/.html Documentation and example files for ML algorithms
kruskal_mst.r Duplicate Kruskal implementation in root directory

Copy link
Member

@siriak siriak left a comment

Choose a reason for hiding this comment

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

You have committed 211 files, check this and commit only changed files

Image

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