Need hint for the above question "Sum it up" in backtracking

I am able to find the approach of recursion for generating the subsets for the sum value. Anything specific that the backtracking approach can help here ?

Not able to think or visualise the approach for this

Hey @nik72619c
First sort ur given input array (because then only we can generate lexicographical order)
then generate all subsets recursively use vector or array for that ,
One call without current element and one call with current element
then in base case of ur recursive code check if sum of the generated subset is equal to target or not.
if it is then insert that subset(as a vector) in a set (set because it will remove duplicate subsets and it will keep all of them in sorted order)

at last print ur set