How to print all the subsets of a given set using bit manipulation ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to print all the subsets of a given set using bit manipulation ?

Suppose the array is [1,2,3] then all the subsets are (1),(2),(3),(1,2),(1,3),(2,3),(1,2,3)

17th Aug 2017, 4:00 PM
Ankit Raj
1 Answer
+ 5
I prepared something that should be a *bit* close to what you might be looking for: https://code.sololearn.com/cC3WxApRick3/?ref=app
17th Aug 2017, 8:44 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar