The test suite throws errors where but I get correct answers when I run.
function y = fcn(n,k)
y = size(combntns(1:n,k),1);
end
Test | Status | Code Input and Output |
---|---|---|
1 | Fail |
n = 1;
k = 1;
y_correct = 1;
assert(isequal(fcn(n,k),y_correct))
|
2 | Fail |
n = 4;
k = 2;
y_correct = 6;
assert(isequal(fcn(n,k),y_correct))
|
3 | Fail |
n = 20;
k = 10;
y_correct = 184756;
assert(isequal(fcn(n,k),y_correct))
|
What is the next step in Conway's Life?
639 Solvers
All your base are belong to us
463 Solvers
Find perfect placement of non-rotating dominoes (easier)
240 Solvers
middleAsColumn: Return all but first and last element as a column vector
387 Solvers
Make a run-length companion vector
512 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!