simplified classic
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
n = 1;
y_correct = [2];
assert(isequal(unHanoingProblem(n),y_correct))
|
2 | Pass |
%%
n = 3;
y_correct = [1 3 3 7];
assert(isequal(unHanoingProblem(3),[2 3 1 2 3 1 2]))
|
3 | Pass |
%%
n = 6;
y_correct = [2 3 1 2 3 1 2];
assert(isequal(unHanoingProblem(n),[3 2 1 3 2 1 3 2 1 3 2 1 3 2 1 3 2 1 3 2 1 3 2 1 3 2 1 3 2 1 3 2 1 3 2 1 3 2 1 3 2 1 3 2 1 3 2 1 3 2 1 3 2 1 3 2 1 3 2 1 3 2 1]))
|
Find the sum of all the numbers of the input vector
31949 Solvers
6364 Solvers
238 Solvers
Side of an equilateral triangle
2595 Solvers
270 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!