private void DFS(List<Integer>[] adjacentVertices,
                     Integer vertex, List<Integer> currentComponent) {
        explored[vertex] = true;
        if(currentComponent != null)
            currentComponent.add(vertex);

        List<Integer> adjacentVertexList = adjacentVertices[vertex];
        if(adjacentVertexList!=null){
            for(int i=0; i< adjacentVertexList.size(); i++){
                Integer adjacentVerex= adjacentVertexList.get(i);
                if(!explored[adjacentVerex])
                    DFS(adjacentVertices, adjacentVerex, currentComponent);
            }
        }
        finishingTime++;
        finishingTimes[vertex] = finishingTime;

    }