Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
x = 122131221;
y_correct = true;
assert( isequal(isNumPalindrome(x),y_correct) && isempty(regexp(evalc('type isNumPalindrome'),'(str|printf|eval|flip|dec2base)')) )
y =
1 2 2 1 3 1 2 2 1
y =
logical
1
|
2 | Pass |
x = 1221;
y_correct = true;
assert( isequal(isNumPalindrome(x),y_correct) && isempty(regexp(evalc('type isNumPalindrome'),'(str|printf|eval|flip|dec2base)')) )
y =
1 2 2 1
y =
logical
1
|
3 | Pass |
x = 12345;
y_correct = false;
assert( isequal(isNumPalindrome(x),y_correct) && isempty(regexp(evalc('type isNumPalindrome'),'(str|printf|eval|flip|dec2base)')) )
y =
1 2 3 4 5
y =
logical
0
|
4 | Pass |
x = 9849;
y_correct = false;
assert( isequal(isNumPalindrome(x),y_correct) && isempty(regexp(evalc('type isNumPalindrome'),'(str|printf|eval|flip|dec2base)')) )
y =
9 8 4 9
y =
logical
0
|
4107 Solvers
Construct a string from letters and counts
128 Solvers
Back to basics 4 - Search Path
322 Solvers
331 Solvers
Pernicious Anniversary Problem
735 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!