0

I am trying to fill an array with boolean values such that I return a different array each time, eventually having returned all possible arrays.

Example output for array size 5: [True, True, True, True, True] Then: [True, True, True, True, False] And so on and so forth...

I am aware of code that would fill a smaller array with all combinations from a bigger array but i can not do it the other way around

Valentino
  • 21
  • 5

1 Answers1

1

binary representation from 0 to 2^n.

00000
00001
00010
00011
...

11111

assylias
  • 321,522
  • 82
  • 660
  • 783
ugurdonmez
  • 154
  • 1
  • 9