Sir, please provide some hint so that I can solve this problem.
Sir , I am not able to find the approach
@kodivine0
Algorithm :
- Sort the array(non-decreasing).
- First remove all the duplicates from array.
- Then use recursion and backtracking to solve the problem.
-
- If at any time sub-problem sum == 0 then add that array to the result (vector of vectors).
-
- Else if sum if negative then ignore that sub-problem.
-
- Else insert the present array in that index to the current vector and call the function with sum = sum-ar[index] and index = index, then pop that element from current index (backtrack) and call the function with sum = sum and index = index+1
-
try now if facing problems will refer you to editorial code
if cleared hit like and mark resolved 
if we remove the duplicates, then for the given example, how will we get the required o/p?
@kodivine0 if you are having trouble with this app refer this
simple include exclude like subsequences
map is used so in final ans no duplicates there
what is map? we have not been taught…
@kodivine0 it would be better if you attempt this question after studying map.
just do it without map for now (map is just used for printing order and duplicates)
even the editorial contain set and maps
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.