Linked Questions

5 votes
11 answers

Partition of Array [duplicate]

Given an integer array. You have to check whether it is possible to divide the array in two parts such that the sum of elements of one part is equal to the sum of the element of the other part.If it ...
Dangling_pointer's user avatar
1 vote
0 answers

Searching for a sum [duplicate]

In this challenge you will take two inputs One input will be a string of numbers of any length which you will put into an array/table/whatever you call it in your language Ex: ...
user avatar
32 votes
23 answers

Can this value be made with unique coins and/or notes?

Write a program which calculates if an inputted monetary value, as an integer, can be represented by a unique combination of coins and/or notes, that meaning the same coin/note cannot be used more ...
User's user avatar
  • 421
20 votes
23 answers

Make Zero From First 'n' Numbers

Challenge The challenge is to write a code that takes a positive integer 'n' as an input and displays all the possible ways in which the numbers from 1 - n can be written, with either positive or ...
Manish Kundu's user avatar
  • 5,260
10 votes
10 answers

Choose from an existing set of weights to make a target sum

When doing weightlifting, I want to make a specific weight by attaching several plates to a bar. I have the following plates: 6 plates of 1 kg each 6 plates of 2.5 kg each 6 plates of 5 kg each 6 ...
anatolyg's user avatar
  • 13.1k
5 votes
18 answers

Sum of Numbers of Array [closed]

Given an array (N) of integers, check if it is possible to obtain a sum of S, by choosing some (or none) elements of the array ...
Dangling_pointer's user avatar
12 votes
5 answers

Average Out Two Lists

Average out two lists Challenge Given two lists of positive integers, determine whether it is possible to rearrange the elements into two new lists such that the new lists have the same arithmetic ...
Downgoat's user avatar
  • 28.9k
12 votes
9 answers

Divide and stay Happy. Who cares about the Conquer part?

Well, when I buy gifts for my two wives, I want them to feel equally important to me, but it's hard to go shopping with fixed budgets. Instead, I buy a bunch of stuff and divide them into two groups ...
rahulroy9202's user avatar
18 votes
1 answer

Solve Subset-Sum in polynomial time (...if P = NP)

Shocking news: Dr. Mad J Scientist has released a proof of P = NP to the world. But the proof is nonconstructive, and she's keeping the algorithm to herself. Worry not. Without even looking at her ...
Lopsy's user avatar
  • 331
-3 votes
2 answers

Zero sum in python 2.7 [closed]

Write a function in Python 2.7 that takes a list of integers as an argument. It should return True or False depending on whether there are any 2 integers in the argument list that sum to zero. [4,-4,9,...
Arlene's user avatar
  • 13
1 vote
0 answers

Weight balancing problem [duplicate]

Have you ever wondered, when doing shopping, how to pack your products into 2 bags you're carrying so that a total weight would be distributed among them as evenly as possible? Your task is to write ...
Adamantium's user avatar