Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat : find maximum flow in a graph #791

Merged
merged 4 commits into from May 25, 2020
Merged

Conversation

@offamitkumar
Copy link
Contributor

offamitkumar commented May 24, 2020

fixes #790
Implemented the Ford-Fulkerson method with Edmond Karp Optimization.

* vis -> visited node
* c_n -> current_node
* n -> total number of nodes
* m -> total number of edges
* s -> source
* t -> sink
Comment on lines 11 to 16

This comment has been minimized.

Copy link
@cclauss

cclauss May 24, 2020

Member

Please use real variable names and wrap lines like the rest of the world does.

This comment has been minimized.

Copy link
@offamitkumar

offamitkumar May 24, 2020

Author Contributor

sure

using std::min;
using std::max;
using std::tie;
using std::make_tuple;
using std::make_pair;
// standard containers used
using std::vector;
using std::queue;
using std::bitset;
using std::tuple;
// standard streams used
using std::cout;
using std::cin;
Comment on lines 29 to 41

This comment has been minimized.

Copy link
@cclauss

cclauss May 24, 2020

Member

Please put these inline instead of 12+ lines using.

@offamitkumar offamitkumar requested a review from cclauss May 25, 2020
@offamitkumar offamitkumar requested a review from cclauss May 25, 2020
Copy link
Member

cclauss left a comment

LGTM. Thanks.

@offamitkumar
Copy link
Contributor Author

offamitkumar commented May 25, 2020

It will be helpful if you merge this request so that I can create another for the n-queen solution.

Copy link
Contributor

ayaankhan98 left a comment

good work @offamitkumar

@ayaankhan98 ayaankhan98 merged commit 1f07064 into TheAlgorithms:master May 25, 2020
3 checks passed
3 checks passed
build
Details
cpplint_modified_files
Details
sorting_non_recursive_merge_sort
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

3 participants
You can’t perform that action at this time.