Hello,
I was working on a problem for generating the binary combination of x digits, as input. E.g. for x = 2, I have 2^2-1:
0--> 00
1--> 01
2--> 10
3--> 11
My program solves this by converting the decimal values to binary and then padding the required leftmost zeros.
Is there any other optimized solution?