Hey how to do this question

hey if you provide the code please change the vector part into array! Please!

hi @mahroosanwar0901_2642b14836027bbf, if u’ll do it with array u’ll neet to maintain pointers but with vector its easy u just need to push and pop, pointers are maintained internally

ya but we did not cover vectors yet , that why I need that approach ,… :slightly_smiling_face:
can you tell or provide approach that have not use vector :pray:

hello sir please tell me how to approach this problem?

@mahroosanwar0901_2642b14836027bbf u can refer here https://afteracademy.com/blog/print-all-subsets-of-a-given-set

@mahroosanwar0901_2642b14836027bbf, check this ive done most of the thing just think how to produce the ordered format given in question https://ide.codingblocks.com/s/657504

thanks so much I got the approach but

Your o/p is like this :
6 3 1
5 4 1
6 4

I do some changes in code so it become:
5 4 1
3 6 1
6 4

but o/p should be :
6 4
3 6 1
5 4 1

I tried but not get correct.
please tell how to print samller first

@mahroosanwar0901_2642b14836027bbf, u can store and then think of ordering based on length try it!!!

@mahroosanwar0901_2642b14836027bbf check this https://ide.codingblocks.com/s/657516 ive added that

thanks You can mark as resolved

is there any way to this part without using vector

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.