Time complexity of the above algorithm is O(max_flow * E). We run a loop while there is an augmenting path. In worst case, we may add 1 unit flow in every iteration. Therefore the time complexity becomes O(max_flow * E)
yes, i understood that O(max_flow) is complexity for finding all paths one by one in graph from source to destination and O(E) is complexity of One bfs/dfs when we use Adjacency List representaion of graph
but everywhere on net, i have seen every code is using Adjacency matrix(2D array) for graph then for one bfs it should be O(V^2) so overall should be (max_flow*V^2)… but not why?
similar to Edmonds–Karp algorithm implementation of the Ford–Fulkerson method for computing the maximum flow in a flow network, it should be (V^2)(VE)=== v^3E for adjaceny matrix representaion but given as O(V E2) … please help