Binary Possibilities

Given a length, do:

  • Math.pow(2, LENGTH); result is going to be the size of array
  • LENGTH will be size of string
  • "0" and "1" will be the only possible characters for the stream
  • Set will store the unique binary values generated in the for loop
  • You will have an array with all the possible unique values