If there is an edge from i to x then increment indegree of x
for ( let i = 0 ; i < V ; i ++ ) { for ( let x = 0 ; x < adj [ i ] . length ; x ++ ) { indeg [ adj [ i ] [ x ] ] = indeg [ adj [ i ] [ x ] ] + 1 ; } } }