Topological Sort DFS

Given a directed graph with n vertices and edges, return the topological sort of the vertices. If there's a cycle, return empty array.

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

Topological Sort DFS

Given a directed graph with n vertices and edges, return the topological sort of the vertices. If there's a cycle, return empty array.