Category: Knapsack Problems
Given a non-empty array nums containing only positive integers, find if the array can be partitioned into two subsets such that the sum of elements in both subsets is …
You have some coins. The i-th coin has a probability prob of facing heads when tossed. Return the probability that the number of coins facing heads equals target if …
You are given coins of different denominations and a total amount of money. Write a function to compute the number of combinations that make up that amount. You may …
Given a set of candidate numbers (candidates) (without duplicates) and a target number (target), find all unique combinations in candidates where the candidate numbers sums to target. The same …
You are given coins of different denominations and a total amount of money amount. Write a function to compute the fewest number of coins that you need to make …