# C Program to find the best subset from an array whose sum is equal to X number

C Program to find the best subset from an array whose sum is equal to X number

Example follows,

I have an array as (array size will vary from 8 to 14)

array = array(3,5,6,10,15,30,12,35,30,20);

sum = 69;

minimum number count = 4

maximum number count = 6

then there are 3 different sums that equal 69:

3+5+6+10+15+30, (count is 6)

3+6+10+20+30, (count is 5)

3+6+30+30, (count is 4)

The best one is 3+6+30+30. Because it contains higher number from array to complete the sum that reduce the number count.

In this example the count is 4.

The result should be available in an array as,

result = result(1,3,6,9,0,0,0,0,0,0);

resbin = resbin(1,0,1,0,0,1,0,0,1,0);

boolean t = 1;

............................. other condition ............................................

array = array(3,5,6,10,15,2,12,5,3,2,6);

sum = 69;

minimum number count = 4

maximum number count = 6

even though 3+5+6+10+15+2+12+5+3+2+6 = 69 (count is 10), it dosen't fall under the maximum count = 6,

The result should be available in an array as,

result = result(0,0,0,0,0,0,0,0,0,0);

resbin = resbin(0,0,0,0,0,0,0,0,0,0);

boolean t = 0;

Compétences : Programmation C

Concernant l'employeur :
( 6 commentaires ) Coimbatore, India

Nº du projet : #13975648

## Décerné à:

kshitij1998

I am well versed with C/C++. I have already written the required code in C. Output of some test cases can be seen here: [login to view URL] I have been into competitive programming since 3.5 years now. I am Plus

%selectedBids___i_sum_sub_7% %project_currencyDetails_sign_sub_8% USD en 0 jours
(1 Évaluation)
0.4

## 32 freelance font une offre moyenne de \$29 pour ce travail

Yknox

Hello I'm interesting your project very well I'm a Good C/C++, Java, Math, Algorithm expert. I m quite well experienced in these jobs. Let's go ahead with me I want to service for you continously. Thanks

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(415 Commentaires)
8.4
hbxfnzwpf

I am very proficient in c and c++. I have 16 years c++ developing experience now, and have worked for more than 7 years. My work is online game developing, and mainly focus on client side, using c++ under windows envir Plus

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(101 Commentaires)
6.8
%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(70 Commentaires)
5.3
dyuldashev

Hi, I hope you are doing well. I graduated from the University of Texas at Austin with a BS in Computer Science about a year ago. I read through you finding the subset C++ program, and I will be able to deliver it w Plus

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(26 Commentaires)
5.0
DemonDeveloper

We are team of excellent developers. We have 2 year experience related to your project field. We can do your project and solve your all problems according to your requirements. We have read your description for project Plus

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(37 Commentaires)
4.8
idleswell

Hello, I have 30 years experience programming in C. I will design this program to evaluate the best subset of an array to compute a sum using a minimum number of values and no more than a maximum number of values. Plus

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 3 jours
(63 Commentaires)
4.9
waleedibrahim92

Hey I am an expert C programmer. I have made many projects controlling many types of micro controllers using C programming language. Please contact me for more details.

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(34 Commentaires)
4.9
%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(53 Commentaires)
5.1
%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(11 Commentaires)
4.8
gustavorg

Hello I have 25+ years of C/C++ programming experience, 10 years as freelancer 300+ projects completed. I am reliable, easy to work with, quick to turn things around, and a good communicator. Bid details: · I´ll Plus

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(29 Commentaires)
4.9
%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(11 Commentaires)
4.4
schoudhary1553

Greetings sir, i am an expert freelancer for this job and your 100% satisfaction is assured if you allow me to serve. Here is the reason. Why you should pick me? a) I am a very expert and have the same kind of ex Plus

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(8 Commentaires)
4.1

A proposal has not yet been provided

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(10 Commentaires)
4.0
rohitagarberg

MM. Hi, Please let me know more about the C programs, will there be any restriction on the loops used . So that we can take things forward. Thanks.

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(20 Commentaires)
4.0
dghq123

Hi there.. I have read your project details completely and willing to do it for you... Check my recent reviews for our quality work on on time delivery Please inbox and we can discuss about project...

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(15 Commentaires)
4.1
MariuSStar

Hello, I'm a C/C++ senior developer, I can do this for you in under one day. Please let me know if you want my help. Thank you

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(8 Commentaires)
3.5
khurram4225

Hi How are you? I am Head of my team. Our team is new on this website. But we assure you best quality work which will be given to you within your given [login to view URL] you

%bids___i_sum_sub_35% %project_currencyDetails_sign_sub_36% USD en 0 jours
(5 Commentaires)
3.1
%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(2 Commentaires)
2.8
%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(9 Commentaires)
3.8
hoangduong97

Hello, I am experienced and specialized in C/C++ and Java programming, I have experience in Android. I have taken part in many competitions, including national competition, in which I won 2nd prize. I am currently a Co Plus

%bids___i_sum_sub_32% %project_currencyDetails_sign_sub_33% USD en 1 jour
(11 Commentaires)
2.6