Please provide any hint or approach or steps how to solve this problem?
Thanks
Please provide any hint or approach or steps how to solve this problem?
Thanks
Hint 1: Try to think of a graph for describing the scenario.
Feel free to ask for further hints.
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.
Sorry!! i still not able to come up with solution!!!
Help me with more hints or approach!!!thanks
@rasokan It is a simple bfs traversal question. You just have to go to each location and then find the minimum time to reach there .
Something like minimum spanning tree? How to handle co-ordinates?
@rasokan
Solution of the problem is a brute force, as range of n is 1<= n<= 5.
you have to consider all possible combination of using the n pipes and then select the one with minimum value.
Total number of combination would be: 32*120.
32 = 2^5= total number of set of n pipes,
120= 5!= all permutation of those n pipes, so for all set we will have max 120 permutation.
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.