challenged problem - homework help.

Thread Starter

JimmyCho

Joined Aug 1, 2020
62
Hi guys .
I'm struggling to implement in C a function that gets as two inputs , one input is an integer array, second input is the given sum.
the function returns the pairs of two element that its sum equal to the given sum.
I don't have much experience in C , and I started to implement the function by myself.

I've seen the solution here step by step :
but I really didn't understand the logic of the explained code in the video, could anyone please explain to me the algorithm / the code that's explained on the video?
how really we find the matched two pairs that its sum equal to the given sum?

For me a pseudo code is also awesome to understand the solution of the problem.

Much appreciated.
 

Xhendos

Joined Dec 1, 2018
9
I don't quite understand your question and I am not going to watch the video so I expect you to explain it. You need to implement a function in the C programming language that takes two arguments. The first argument is an array of integers and the second argument is the sum. The function returns all combinations of the list of integers such that those pairs (added/multiplied/divided/subtracted) gets returned? Can you confirm that this is correct?
 
Top