I am trying to write a method with the following header:
public static boolean difference(int[] numbers, int size, int difference) {...}
I want it to be able to determine if it is possible to choose any two integers from the list "numbers" such that the difference between them is equal to the parameter "difference".
So far I was thinking that I should create a list where the elements contain all possible combinations of the elements in list "numbers" and then fill another list of all possible difference values.
Then I would finally check if the parameter "difference" is inside that list. If it is then it would return true. I also want to do this recursivly so any help would be appreciated. thanks!
sizeparameter?