Generating list of all binary strings of size 2n, where the number of 1s in the first n bits equals the number of 1s in the last n bits

后端 未结 0 939
天命终不由人
天命终不由人 2020-12-24 09:59

For example, given input n=2, I want the output to be [\'1111\', \'1001\', \'0110\', \'0000\', \'0101\', \'1010\']. Note that the order of the output does not matter.

相关标签:
回答
  • 消灭零回复
提交回复
热议问题