Graph Valid Tree

Given n nodes labeled from 0 to n-1 and a list of edges, determine if these edges form a valid tree.

Examples
Input: [5,[[0,1],[0,2],[0,3],[1,4]]]
Output: true
Hints

Graph Valid Tree

Given n nodes labeled from 0 to n-1 and a list of edges, determine if these edges form a valid tree.