Skip to content

Minimum sum partition #1338

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

Merged
merged 2 commits into from
Jun 3, 2020
Merged

Conversation

swatiprajapati08
Copy link
Contributor

Given an array, the task is to divide it into two sets S1 and S2 such that the absolute difference between their sums is minimum.

Given an array, the task is to divide it into two sets S1 and S2 such that the absolute difference between their sums is minimum.
@@ -0,0 +1,64 @@
// Partition a set into two subsets such that the difference of subset sums is minimum

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kindly provide some sample test cases

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added.

Added some test cases for better understanding.
Copy link
Member

@deadshotsb deadshotsb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@swatiprajapati08 good work

@deadshotsb deadshotsb merged commit 4ac4a62 into TheAlgorithms:master Jun 3, 2020
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.

2 participants