Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
deck = 1:28;
n = 10;
out = [3 22 9 4 23 7 25 16 14 14];
assert(isequal(solitaire(deck, n),out))
out =
3
out =
3 22
out =
3 22 9
out =
3 22 9 4
out =
3 22 9 4 23
out =
3 22 9 4 23 7
out =
3 22 9 4 23 7 25
out =
3 22 9 4 23 7 25 16
out =
3 22 9 4 23 7 25 16 14
out =
3 22 9 4 23 7 25 16 14 14
|
2 | Pass |
deck = 1:28;
n = 9;
out = [3 22 9 4 23 7 25 16 14];
assert(isequal(solitaire(deck, n),out))
out =
3
out =
3 22
out =
3 22 9
out =
3 22 9 4
out =
3 22 9 4 23
out =
3 22 9 4 23 7
out =
3 22 9 4 23 7 25
out =
3 22 9 4 23 7 25 16
out =
3 22 9 4 23 7 25 16 14
|
Sort a list of complex numbers based on far they are from the origin.
3791 Solvers
1513 Solvers
298 Solvers
Try 1.5.4: Celsius to Fahrenheit
486 Solvers
261 Solvers