0

I have a mid exam in this lockdown and i am helpless bcz i have not good in python, i submitted my task 1 H, can anyone hlp me?

Task: Write a python program in which you have to create a function, that function will accept two parameters. First parameter can be (1 or 2). Second will be a data structure of graph (The graph nodes and edges should be as described above). The function should return number of nodes in the graph by either DFS or BFS . If first parameter is one the function should use DFS to return the number of nodes and if First parameter is two then the function should return the number of nodes using BFS.

11th Apr 2020, 12:28 PM
Fazal-e-rabbi
2 Antworten
+ 3
Show your attempt first Please show your code here so that we can help you https://www.sololearn.com/post/75089/?ref=app
11th Apr 2020, 12:38 PM
Gordon
Gordon - avatar
+ 1
Hard stuff But how should the graph be described? You should post it too.
11th Apr 2020, 2:20 PM
Oma Falk
Oma Falk - avatar