Google Interview Question

2D array contains nodes and edges, should find the graph has unique path or not!