Pigeon hole principle how use in this

Whant some more clarification why answer come by just addind min(x,n-x)2(distance) of all edges.

min(x,n-x) signifies how many times a particular edge is used.

Please say something more about it.

Hi. so for each edge we are checking how many times at max it is crossed. lets say we have a edges and on one side we have 3 nodes and on the other we have 5 nodes then at max 3 times it is used. so we are taking min(x, n-x)

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.