As per the example explained in video, if in 1st case - edge between D and C, we have traveled D to other component , then why in 2nd case we are again considering C and D both as D was chosen in previous case. And same thing in other cases also.
Holiday Accomodation Doubt
@anishanand3733 when gone to d it dont contain any other unvisited neighbour thats why it returned its count to its parent c after adding to the answer and same continues . its called backtracking.(end is reached so it gradually comes back)
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.