Is This Sum Possible?
Goal
// Sample Runs
Input: numbers = [2,7,11,15], target = 9
Output: True
Explanation: The sum of 2 and 7 is 9.
Input: numbers = [2,3,4], target = 6
Output: True
Explanation: The sum of 2 and 4 is 6.
Input: numbers = [-1,0], target = -1
Output: True
Explanation: The sum of -1 and 0 is -1.
Input: numbers = [1, 2, 3, 9], target = 8
Output: False
Explanation: No two combination of values add up to 8.
Input: numbers = [1, 2, 4, 4], target = 8
Output: True
Explanation: 4 + 4 is 8; moreover,
index 2 and index 3 contain duplicates of 4 which allows a sum of 8Problem Constraints
Solution Ideas
Connected Readings
Last updated