Since edge u is removed , update the indegrees of all the nodes which had an incoming edge from u
foreach ( int x in adj [ u ] ) { indeg [ x ] -- ; if ( indeg [ x ] == 0 ) { q . Enqueue ( x ) ; } } } return res ; }