Company: Trs_5aug
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 an 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 function `solve`. 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 int solve(int N, int K, vector<int> special_nodes, vector<int> node_from, vector<int> node_to) Input Format Note: Use this input format if you are testing against custom input or wri