Given a tree with n nodes labeled 0..n-1 (rooted at 0) and an undirected edge list, return the size of the minimum vertex cover — the smallest set of nodes such that every edge has at least one endpoint in the set. The input is JSON {n, edges}.
Input: JSON {n, edges}.
Output: Integer — the minimum vertex cover size.
Input: {"n":5,"edges":[[0,1],[0,2],[1,3],[1,4]]}
Output: 2
Explanation: Nodes 0 and 1 cover every edge.Input: {"n":1,"edges":[]}
Output: 0
Explanation: No edges.Input: {"n":2,"edges":[[0,1]]}
Output: 1
Explanation: One node covers the edge.1<=n<=10^5edges form a tree