Write a function that takes in an array of numbers and a number, and returns true if any pairs add up to the number. (The numbers in the array is unique, meaning there will be no duplicate numbers) solution([1,2,22,333,23], 25) // returns true solution([1,2,22,333,23], 24) // returns true
However, the last test case tests the input [0, 0, 0], 0, all duplicate values.
Is the test case wrong, or is the description wrong for this problem?
The description for this problem is:
However, the last test case tests the input
[0, 0, 0], 0
, all duplicate values.Is the test case wrong, or is the description wrong for this problem?