Problem:
Check if three numbers in an array sum to n.
Question- Describe pseudo code/an algorithm to check if three numbers in an array can sum to n. I want to print "yes" if it's true.
For example, if A[1..7] = [28, -70, -23, 92, 56, -33, -77] and t = -47, the answer would be “yes”, because if we set i = 2, j = 5, and k = 6, we have A[i] + A[j] + A[k] = -70 + 56 - 33 = -47
I am just looking for some pseudo code, not a full solution. The numbers CANNOT be the same, i, j, k must be unique.
Please explain what is pseudocode in detail.