The problem is:
Suppose that you are given an algorithm as a black box – you cannot see how it is designed – it has the following properties: if you input any sequence of real numbers and an integer k, the algorithm will answer YES or NO indicating whether there is a subset of numbers whose sum is exactly k. Show how to use this black box to find the subset of a given set of numbers S whose sum is k. You can use the black box O(n) times.
Before I post this question, I've already searched for the exact same question:
An algorithm to determine a subset sequence in O(n)?
Using subset-sum oracle to determine which numbers are members of the subset
I cannot find a satisfactory answer in those posts. Suppose
S = {1, 2, 3, 4, 5, 6, 7, 8}, k = 7
Querying Oracle (S or S \setminus any one element), will return YES. that doesn't help in coming up with a particular subset that sum up to k.