Tap here to switch tabs
Problem
Submissions

Problem: Combination Sum II

med
30 min
Try to solve the Combination Sum II problem.

Statement

Given an integer array candidates and an integer target, return all unique combinations of values from candidates whose sum is exactly target.

Each value in candidates may be selected at most once in a combination. The returned list must not contain duplicate combinations, even if candidates contains repeated values.

Note: The order of values inside a combination does not matter, and the order of combinations in the output does not matter.

Constraints:

  • 11 \leq candidates.length 100\leq 100

  • 11 \leq candidates[i] 50\leq 50

  • 11 \leq target 30\leq 30

Unlock AI-Powered LearningUpgrade to smarter learning with instant explanations of Ask Agent, Personalized Interview Prep, Real-World Projects, 3 AI Mock Interviews per month, and Personalized Paths
Tap here to switch tabs
Problem
Submissions

Problem: Combination Sum II

med
30 min
Try to solve the Combination Sum II problem.

Statement

Given an integer array candidates and an integer target, return all unique combinations of values from candidates whose sum is exactly target.

Each value in candidates may be selected at most once in a combination. The returned list must not contain duplicate combinations, even if candidates contains repeated values.

Note: The order of values inside a combination does not matter, and the order of combinations in the output does not matter.

Constraints:

  • 11 \leq candidates.length 100\leq 100

  • 11 \leq candidates[i] 50\leq 50

  • 11 \leq target 30\leq 30

Unlock AI-Powered LearningUpgrade to smarter learning with instant explanations of Ask Agent, Personalized Interview Prep, Real-World Projects, 3 AI Mock Interviews per month, and Personalized Paths