Skip to content

Conversation

bobbysharma05
Copy link

Fixes #477

Pseudocode

  • Verify s and t exist in graph
  • Initialize max_flow = 0, flow_pass = {}
  • While true:
    • Find augmenting path using DFS
    1. If no path found, break
    1. Add path_flow to max_flow
    1. Update flow_pass along path (add to forward edges, subtract from backward edges)
  • Return max_flow

Other comments

If there is any scope of improvement do tell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Network flow: fork Fulkerson algorithmn
1 participant