Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
n = 5;
y_correct = [1 0 1 0 1];
assert(isequal(alternating10(n),y_correct))
|
2 | Pass |
n = 8;
y_correct = [1 0 1 0 1 0 1 0];
assert(isequal(alternating10(n),y_correct))
|
3895 Solvers
Given an unsigned integer x, find the largest y by rearranging the bits in x
781 Solvers
520 Solvers
289 Solvers
300 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!