enow.com Web Search

Search results

  1. Results from the WOW.Com Content Network
  2. Subsets - LeetCode

    leetcode.com/problems/subsets

    Subsets - Given an integer array nums of unique elements, return all possible subsets (the power set). The solution set must not contain duplicate subsets. Return the solution in any order.

  3. Subsets II - LeetCode

    leetcode.com/problems/subsets-ii

    Subsets II - Given an integer array nums that may contain duplicates, return all possible subsets (the power set). The solution set must not contain duplicate subsets. Return the solution in any order. Example 1: Input: nums = [1,2,2] Output: [ [], [1], [1,2], [1,2,2], [2], [2,2]] Example 2: Input: nums = [0] Output: [ [], [0]] Constraints: * 1 ...

  4. The Number of Beautiful Subsets - LeetCode

    leetcode.com/problems/the-number-of-beautiful-subsets

    Return the number of non-empty beautiful subsets of the array nums. A subset of nums is an array that can be obtained by deleting some (possibly none) elements from nums. Two subsets are different if and only if the chosen indices to delete are different.

  5. Partition Equal Subset Sum - LeetCode

    leetcode.com/problems/partition-equal-subset-sum

    Partition Equal Subset Sum - Given an integer array nums, return true if you can partition the array into two subsets such that the sum of the elements in both subsets is equal or false otherwise. Example 1: Input: nums = [1,5,11,5] Output: true Explanation: The array can be partitioned as [1, 5, 5] and [11].

  6. Partition Array Into Two Arrays to Minimize Sum Difference -...

    leetcode.com/problems/partition-array-into-two-arrays-to-minimize-sum-difference

    Partition Array Into Two Arrays to Minimize Sum Difference - You are given an integer array nums of 2 * n integers. You need to partition nums into two arrays of length n to minimize the absolute difference of the sums of the arrays.

  7. Subsets - LeetCode

    leetcode.com/problems/subsets/solutions

    Can you solve this real interview question? Subsets - Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.

  8. Largest Divisible Subset - LeetCode

    leetcode.com/problems/largest-divisible-subset

    Largest Divisible Subset - Given a set of distinct positive integers nums, return the largest subset answer such that every pair (answer[i], answer[j]) of elements in this subset satisfies: * answer[i] % answer[j] == 0, or * answer[j] % answer[i] == 0 If there are multiple solutions, return any of them.

  9. Partition to K Equal Sum Subsets - LeetCode

    leetcode.com/problems/partition-to-k-equal-sum-subsets

    Partition to K Equal Sum Subsets - Given an integer array nums and an integer k, return true if it is possible to divide this array into k non-empty subsets whose sums are all equal. Example 1: Input: nums = [4,3,2,3,5,2,1], k = 4 Output: true Explanation: It is possible to divide it into 4 subsets (5), (1, 4), (2,3), (2,3) with equal sums.

  10. Find Array Given Subset Sums - LeetCode

    leetcode.com/problems/find-array-given-subset-sums

    Find Array Given Subset Sums - You are given an integer n representing the length of an unknown array that you are trying to recover. You are also given an array sums containing the values of all 2n subset sums of the unknown array (in no particular order).

  11. Sum of All Subset XOR Totals - LeetCode

    leetcode.com/problems/sum-of-all-subset-xor-totals

    Given an array nums, return the sum of all XOR totals for every subset of nums. Note: Subsets with the same elements should be counted multiple times. An array a is a subset of an array b if a can be obtained from b by deleting some (possibly zero) elements of b.