Company: curefir_14oct
Difficulty: medium
Special nodes path Problem Description You have a tree consisting of N nodes. There are K number of special nodes in the tree. You can perform some operation on the tree exactly once: Add an edge between any 2 special nodes. Find the minimum distance between node 1 and node N you can get after performing the operation exactly once. Function description Complete the solve() function. The function takes the following 5 parameters and returns a single integer denoting the answer to the question: N : Represents the number of nodes in the tree K : Represents the number of special nodes special_nodes : Represents the array containing the special nodes node_from : Represents the array denoting the starting node of each edge node_to : Represents the array denoting the ending node of each edge Input/Output Format Input format for custom testing Note: Use this input format if you are testing against custom input or writing code in a language where we don't provide boilerplate code. The first lin