Full Article: https://tutorialhorizon.com/algorithm...
Given a directed graph which represents a flow network involving source(S) vertex and Sink (T) vertex. Each edge in the graph has an individual capacity which is the maximum flow that edge allows.
Flow in the network has following restrictions-
-Input flow must match to output flow for each node in the graph, except source and sink node.
-Flow out from source node must match with flow in to sink node.
-Flow from each edge should not exceed the capacity of that node.