-
-
Notifications
You must be signed in to change notification settings - Fork 342
Hierholzer eulerian #270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Hierholzer eulerian #270
Conversation
There was a problem hiding this 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 PR adds Hierholzer's Algorithm implementation for finding Eulerian circuits in graphs, along with extensive additions across multiple algorithm categories including graph algorithms, dynamic programming, machine learning, and mathematics.
Key changes:
- Implementation of Hierholzer's algorithm for Eulerian circuit detection
- Addition of multiple graph algorithms (Dijkstra, Floyd-Warshall, Bellman-Ford, DFS, BFS, Kruskal, Prim, Topological Sort, Kosaraju, Hopcroft-Karp, Hamiltonian Cycle, Bridge Detection)
- Implementation of dynamic programming algorithms (0/1 Knapsack, Coin Change, LCS, LIS, Matrix Chain Multiplication, Minimum Path Sum, Subset Sum)
- Machine learning implementations (Gradient Boosting, documentation for various ML algorithms)
- Mathematics algorithms (Armstrong Number, Amicable Numbers, Bisection Method)
Reviewed Changes
Copilot reviewed 139 out of 215 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
graph_algorithms/hierholzer_eulerian.r |
Implements Hierholzer's algorithm for finding Eulerian circuits |
graph_algorithms/dijkstra_shortest_path.r |
Implements Dijkstra's shortest path algorithm with priority queue |
graph_algorithms/floyd_warshall.r |
Implements Floyd-Warshall all-pairs shortest path with R6 classes |
graph_algorithms/bellman_ford_shortest_path.r |
Implements Bellman-Ford algorithm with negative cycle detection |
graph_algorithms/depth_first_search.r |
Implements DFS in both recursive and iterative versions |
graph_algorithms/breadth_first_search.r |
Implements BFS with shortest path finding capabilities |
graph_algorithms/kruskal_mst.r |
Implements Kruskal's MST algorithm using union-find |
graph_algorithms/prim_mst.r |
Implements Prim's MST algorithm |
graph_algorithms/topological_sort.r |
Implements Kahn's algorithm for topological sorting |
graph_algorithms/kosaraju_scc.r |
Implements Kosaraju's algorithm for strongly connected components |
graph_algorithms/hopcroft_karp_max_matching.r |
Implements Hopcroft-Karp for maximum bipartite matching |
graph_algorithms/hamilitonian_cycle.r |
Implements backtracking algorithm for Hamiltonian cycle detection |
graph_algorithms/bridge_detector.r |
Implements Tarjan's algorithm for bridge detection |
machine_learning/gradient_boosting.r |
Implements gradient boosting regressor using R6 classes |
machine_learning/README.md |
Adds machine learning tutorial resources |
dynamic_programming/0/1_knapsack_problem.r |
Implements 0/1 knapsack with DP |
dynamic_programming/coin_change.r |
Implements coin change problem solution |
dynamic_programming/longest_common_subsequence.r |
Implements LCS algorithm with multiple variants |
dynamic_programming/longest_increasing_subsequence.r |
Implements LIS with O(n²) and O(n log n) solutions |
dynamic_programming/matrix_chain_multiplication.r |
Implements matrix chain multiplication optimization |
dynamic_programming/minimum_path_sum.r |
Implements minimum path sum in grid |
dynamic_programming/subset_sum.r |
Implements subset sum problem with DP |
mathematics/armstrong_number.r |
Implements Armstrong number checker |
mathematics/amicable_numbers.r |
Implements amicable number verification |
mathematics/bisection_method.r |
Implements bisection method for root finding |
kruskal_mst.r |
Duplicate of graph_algorithms/kruskal_mst.r in wrong location |
documentation/*.md/*.html |
Documentation and example files for various ML algorithms |
siriak
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have changed 215 files, check your changes
Algorithm: Hierholzer’s Algorithm
Purpose: Finds an Eulerian circuit in a graph, visiting every edge exactly once.
Theory: Starts at any vertex and follows edges to form a cycle; additional cycles are merged until all edges are used. Works for undirected graphs with all vertices of even degree or directed graphs with in-degree = out-degree.
Time Complexity: O(E)
Space Complexity: O(V + E)
Input: Graph as an adjacency list.
Output: Eulerian circuit as a sequence of vertices.