codesankalp / dsalgo

MIT License
8 stars 24 forks source link

Implement graph alogrithms #24

Open Aryamanz29 opened 3 years ago

Aryamanz29 commented 3 years ago

May be adding this would be beneficial

iriyagupta commented 3 years ago

Hi,

Is there any specific question that has to be solved by these algorithms or just the code for how these algorithms are performed has to be submitted? I am new to Hacktoberfest, any help would be appreciated.

codesankalp commented 3 years ago

@iriyagupta according to this issue you have to implement DFS and BFS using python. Your code should be written in the modular way so that it can be used as a method of a package. Before contributing you must read this to know about how a package is made. After this you can make a separate file as dsalgo/graphs.py and start writing code for above mentioned algorithms. Also don't forget to write test cases for your code in tests/.

Happy Coding :relaxed:

Pratik-ahirrao commented 3 years ago

Is this issue open? Can i work on this issue?

devkapilbansal commented 3 years ago

@Pratik-ahirrao you are already assigned to an issue. Resolve it first

rootaux commented 3 years ago

@Aryamanz29 Two questions, which one to use Adjacency List or Adjacency Matrix for graph input? These functions (BFS and DFS) should run on both directed and undirected graphs if that's the case how do you want to handle input in this case?

devkapilbansal commented 3 years ago

@rootaux we want to develop a library so that users can get what they want easily. If all the changes you want to suggest are related, then I would suggest using a single file for that

rootaux commented 3 years ago

@devkapilbansal I was just asking how do you want to handle directed and undirected graphs. Should it be passed as an argument?

bfs(graph, isDirected)

or a different function altogether

directed_bfs(graph)
undirected_bfs(graph)
devkapilbansal commented 3 years ago

@rootaux this approach would be better bfs(graph, isDirected)

rootaux commented 3 years ago

@devkapilbansal On second thought I did not implemented it in the way I said earlier. I figured since the input will be given by the user, it will be up-to him if the graph is directed or not.