Professional Documents
Culture Documents
Submitted by:-
Monika Dogra
Roll no.-R B1803 B57
Reg. no.- 10801186
Part-A
Step 4:- now A remains at the river bank and B sits in boat and comes back.
Step 5:-now both the children i.e. C and D Sit in boat and cross boat.
Step 6:- one of the child come in boat to another side and takes his mother
and cross the river.
Finally all have reached the another side of river safely.
Part-B
3 4
2
6
5
7
a. Find the path from node 1 to node 7 using depth first
search.
search.
Solution:-
3.than next level nodes are traverse i.e 567 and path will be
1234567