Create a residual graph and fill the residual graph with given capacities in the original graph as residual capacities in residual graph Residual graph where rGraph [ i ] [ j ] indicates residual capacity of edge from i to j ( if there is an edge . If rGraph [ i ] [ j ] is 0 , then there is not )
int rGraph [ V ] [ V ] ; for ( u = 0 ; u < V ; u ++ ) for ( v = 0 ; v < V ; v ++ ) rGraph [ u ] [ v ] = graph [ u ] [ v ] ;