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.

2 Answers

+ 3

Show your attempt first
Please show your code here so that we can help you
https://www.sololearn.com/post/75089/?ref=app

+ 1

Hard stuff
But how should the graph be described?
You should post it too.