HarshCasper / NeoAlgo

Bringing all Data Structures and Algorithms under one Roof âš¡
MIT License
875 stars 1.05k forks source link

I would like to add the 3-Partition Problem inside java folder #7595

Closed ritikverma2000 closed 1 year ago

ritikverma2000 commented 1 year ago

🚀 Feature

3-partition problem: Given a set S of positive integers, determine if it can be partitioned into three disjoint subsets that all have the same sum, and they cover S.

Have you read the Contributing Guidelines on Pull Requests?

yes I have read the contributing guidelines

Motivation

The Motivation behind adding this problem is that it's an important problem asked in many interviews of various companies so this can help students as well as working professionals a lot.

Pitch

The 3–partition problem is a special case of the Partition Problem, which is related to the Subset Sum Problem which itself is a special case of the Knapsack Problem. The goal is to partition S into two subsets with an equal sum in the partition problem. In the 3–partition problem, the goal is to partition S into 3 subsets with an equal sum. For example,

S = { 7, 3, 2, 1, 5, 4, 8 }

We can partition S into three partitions, each having a sum of 10.

S1 = { 7, 3 } S2 = { 5, 4, 1 } S3 = { 8, 2 }

Note that there can be multiple solutions to a single set.

So can you pls /assign me this issue under #hacktoberfest label so that I can start working upon it.

github-actions[bot] commented 1 year ago

Hello @ritikverma2000,
Thank you for opening an issue. :partying_face:
To get assigned to this particular issue please use /assign
Check this guide before contributing.

vikash-19 commented 1 year ago

Hii maintainer, can you please assign this issue to me and add hacktoberfest tag to this issue. Thanks in advance :)

github-actions[bot] commented 1 year ago

Please reopen this issue once you add more information and updates here. If this is not the case and you need some help, feel free to seek help from our Telegram or ping one of the reviewers. Thank you for your contributions!