Can u provide a hint how to approach this problem?
Should we have to use dsu/tsp?
Doubt in approach
Hi @sr30, you can refer this discussion
Religious people
I have provided well commented code you can take a hint from this
we have to do apply simple dfs/bfs in this question
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.