There is a list of numbers and a number k given. You have to return whether any two numbers from the list add up to make it equal to k.
Write a function
solve that have the following parameter(s):
1.) arr = an array of integer
2.) k = integer
[10, 15, 3, 7]
k = 17
The function will return,
After adding integers
10 from an array, it is equal to the value of k that is
• The size of the array will be greater than or equal to 1 and less than or equal to 800.
• An arr[i] will be greater than or equal to 0 and less than or equal to 1000.
• The value of k will be greater than or equal to 0 and less than or equal to 1000.