How proceed and mistakes i am doing......should i return vector
hi @neelrai906, there are some errors in your code :-
- you are doing if(a[i]==β\0β){ but integer arrays doesnβt end with β\0β , you have to pass the length of array in the parameter for your base condition
- In your base condition you forgot to return .
- you forgot to take input of n.
I have corrected your code till your logic :- https://ide.codingblocks.com/s/265062
this code still misses the case on removing duplicates and ordering among subsets.
I want you to try to think by yourself.
hint:- you can use vector<vector > to store your answer and finally sort the vector<vector > to have ordered output .
2. you can use set or map to check for duplicates
you can refer to this code :- https://ide.codingblocks.com/s/265065
explanation is included in the code link
In case of any doubt feel free to ask 
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.