Dear all,

If I have int array[256],

how do I generate permutation from length 1 to 256?

for eg: length 1,

array[0] -> from 00 to 255

for length 5,

array[0] 0 1 2.... to 255

array[1] 0 0 0.... to 255

array[2] 0 0 0.... to 255

array[3] 0 0 0.... to 255

array[4] 0 0 0.... to 255

up to 256

array[0]

to

array [255]

I have been trying to generate the numbers for whole day. I can't think of an algorirhtm. Hope the experts here can help me. Thanks in advance