Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
x = 1
length_correct = 3/sqrt(10);
width_correct = 1/sqrt(10);
[width, length] = findRectangleDimensions(x);
tolerance = 1e-12;
assert( abs(length-length_correct)<tolerance && abs(width-width_correct)<tolerance )
x =
1
|
2 | Pass |
x = 2;
width_correct = 2/sqrt(10);
length_correct = 6/sqrt(10);
[width, length] = findRectangleDimensions(x);
tolerance = 1e-12;
assert(abs(length-length_correct)<tolerance && abs(width-width_correct)<tolerance)
|
Find all elements less than 0 or greater than 10 and replace them with NaN
11632 Solvers
Sort a list of complex numbers based on far they are from the origin.
3794 Solvers
1582 Solvers
Calculate the Levenshtein distance between two strings
304 Solvers
Implement simple rotation cypher
806 Solvers