Hi!
Can anyone help me with an algo to:
Find exactly K integers from a given array of N integers, where the sum of the K integers is equal to M. No integer can be chosen twice, all integers in the array are different.
I particularly want an algo for K = 3, which has an complexity O(N^2).
Please help!
TIA!
Can anyone help me with an algo to:
Find exactly K integers from a given array of N integers, where the sum of the K integers is equal to M. No integer can be chosen twice, all integers in the array are different.
I particularly want an algo for K = 3, which has an complexity O(N^2).
Please help!
TIA!
