Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- given n, print all the combinations of 0 and 1 of length n
- example:
- input: n = 2
- output:
- 00
- 01
- 10
- 11
- input: n = 3
- output:
- 000
- 001
- 010
- 011
- 100
- 101
- 110
- 111
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement