Company: Intuit_21_jan
Difficulty: medium
Minimize Tree Diameter Minimize Tree Diameter Problem Description You are given an undirected tree and are allowed to perform up to k operations on it. In each operation, you can remove a leaf vertex (a vertex connected to exactly one other vertex) and its adjacent edge. Your goal is to minimize the tree's diameter by applying these operations optimally. The distance between two vertices is measured by the number of edges in the shortest path between them. The diameter of a tree is defined as the maximum distance between any pair of vertices in the tree. Return the smallest possible diameter after performing at most k operations. Function Description Complete the function treeCut in the editor. It has the following parameters: int n : the number of vertices in the tree. int k : the number of vertices that can be deleted. vector<vector<int>> edges : a 2D array of connected vertices. The function is expected to return an INTEGER representing the minimum possible diameter. Con