Einsteinia11 / Data-Structures-and-Algorithm-with-Design-and-Analysis

MIT License
7 stars 21 forks source link

[Add Code] - Graph Algorithms. #19

Closed Prabhat-Kumar-42 closed 1 year ago

Prabhat-Kumar-42 commented 1 year ago

Hello, I been looking around the repo and I would love to add graph algorithms to it.

Einsteinia11 commented 1 year ago

Hey, yea you can work on it..

Prabhat-Kumar-42 commented 1 year ago

Hey @Einsteinia11 , I am hoping to add the followings, I will work each feature in different branch and make a PR whenever that branch is completed. I hope it's fine. Thank You.

Graph/ ├── Header/ │ ├── Graph/ │ │ ├── Graph.h │ │ └── WeightedGraph.h │ └── Algorithms/ │ ├── DFS.h │ ├── BFS.h │ ├── TopologicalSort.h │ ├── Dijkstra.h │ ├── BellmanFord.h │ ├── Prim.h │ ├── Kruskal.h ├── Implementation/ │ ├── Graph/ │ │ ├── Graph.cpp │ │ └── WeightedGraph.cpp │ └── Algorithms/ │ ├── DFS.cpp │ ├── BFS.cpp │ ├── TopologicalSort.cpp │ ├── Dijkstra.cpp │ ├── BellmanFord.cpp │ ├── Prim.cpp │ ├── Kruskal.cpp ├── Main.cpp (This file is just to test implemented algorithms).

Prabhat-Kumar-42 commented 1 year ago

Hey @Einsteinia11,

I've added implementations of both weighted and unweighted graphs, along with test files and build scripts for future use. I have made a PR ( #32 ) regarding it. I consider the implementation branch to be final at the moment.

Please review it, and if you find any issues, don't hesitate to let me know. I'll address them as soon as possible.

My next step is to work on graph traversals, and I'll create a PR for that once it's implemented.

Thank you!!

Prabhat-Kumar-42 commented 1 year ago

Hey @Einsteinia11,

I've added implementations of both recursive and non-recursive DFS for both unweighted and weighted graphs to extend the graph module. I have created a PR (#48) regarding it. I consider the implementation of the DFS branch to be final at the moment.

Please review it, and if you find any issues, don't hesitate to let me know. I'll address them as soon as possible.

My next step is to work on graph traversals, specifically BFS, and I'll create a PR for that once it's implemented.

Thank you!!