Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
N = 4;
xn=[0 1 1 0 -1 -1 -1 0 1 2 2 2 2 1 0 -1];
yn=[0 0 1 1 1 0 -1 -1 -1 -1 0 1 2 2 2 2];
correct=[xn' yn'];
[x,y]=Ulam_Spiral_2(N);
assert(isequal([x y],correct))
|
2 | Pass |
N = 5;
xn=[0 1 1 0 -1 -1 -1 0 1 2 2 2 2 1 0 -1 -2 -2 -2 -2 -2 -1 0 1 2];
yn=[0 0 1 1 1 0 -1 -1 -1 -1 0 1 2 2 2 2 2 1 0 -1 -2 -2 -2 -2 -2];
correct=[xn' yn'];
[x,y]=Ulam_Spiral_2(N);
assert(isequal([x y],correct))
|
Number of 1s in the Binary Representation of a Number
319 Solvers
Determine Whether an array is empty
561 Solvers
Find a subset that divides the vector into equal halves
289 Solvers
Find third Side of a right triangle given hypotenuse and a side. No * - or other functions allowed
107 Solvers
Magic is simple (for beginners)
1110 Solvers