Minimum Number of Vertices to Reach All Nodes

Implement solve for Minimum Number of Vertices to Reach All Nodes. Return the required output for the provided arguments.

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

Minimum Number of Vertices to Reach All Nodes

Implement `solve` for **Minimum Number of Vertices to Reach All Nodes**. Return the required output for the provided arguments.