Generate the binary combination as in the example below.
Example: If you are given:
bin_comb(2)
The answer will be:
0 0 0 1 1 0 1 1
The answer will appear in double class.
Solution Stats
Problem Comments
5 Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers96
Suggested Problems
-
Sort a list of complex numbers based on far they are from the origin.
5819 Solvers
-
Given an unsigned integer x, find the largest y by rearranging the bits in x
2069 Solvers
-
Matrix indexing with two vectors of indices
782 Solvers
-
Output any real number that is neither positive nor negative
411 Solvers
-
Vector of numbers divisible by 3
154 Solvers
More from this Author16
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
y_correct of Test case #1 is wrong; it requires [ ].
Case 1: [0;1]
test case 1 should be [0;1] ?
I cleaned up the problem statement and fixed the first test.
Thanks!