1189

 

193

 

714

Using binary search to find the minimum value,

   

11151

 

1152

Meet in the middle  and binary search algorithm is used to solve this problem.

 

208

 

539

Theory: This is an np-hard problem. As the degree of each node can be at most 3 so using dfs ,it can be solved. Follow the link

 

524

 

459

This problem can be solved using dfs,bfs or union find algorithm, BFS solution:

 

11137