Problem 1488. Generate binary combinations for a given number of bit(s)
Solution Stats
Problem Comments
-
5 Comments
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!
Solution Comments
-
1 Comment
Not sure why type 'double' is invalid here. It worked in my MATLAB 2020b.
-
3 Comments
best among the best
Can we not use de2bi function?
Not what I would call "best": it is a Cody-specific hack.
-
2 Comments
Problem Recent Solvers72
Suggested Problems
-
4582 Solvers
-
Replace NaNs with the number that appears to its left in the row.
2410 Solvers
-
Renaming a field in a structure array
1037 Solvers
-
732 Solvers
-
Unique values without using UNIQUE function
231 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!