1. Partition Equal Subset Sumhistorical

    Given a non-empty array containing only positive integers, determine whether the array can be partitioned into two subsets whose sums are equal.

  2. Perfect Squareshistorical

    Given a positive integer n, find several perfect-square numbers (such as 1, 4, 9, 16, ...) whose sum equals n. You need to minimize the number of perfect squares used.

  3. Target Sumhistorical

    Assign a plus or minus sign to each number in a nonnegative integer array and count the assignments whose sum equals the target S.

  4. Combination Sumhistorical

    Given an array candidates containing no duplicate elements and a target number target, find all combinations of numbers in candidates whose sum equals target.

  5. Coin Changehistorical

    Given coins of different denominations and a total amount, write a function to compute the minimum number of coins needed to make up that amount. If no combination of coins can make up the amount, return -1.