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)')) )
xfor =
0
xrev =
122131221
|
2 | Pass |
x = 1221;
y_correct = true;
assert( isequal(isNumPalindrome(x),y_correct) && isempty(regexp(evalc('type isNumPalindrome'),'(str|printf|eval|flip|dec2base)')) )
xfor =
0
xrev =
1221
|
3 | Pass |
x = 12345;
y_correct = false;
assert( isequal(isNumPalindrome(x),y_correct) && isempty(regexp(evalc('type isNumPalindrome'),'(str|printf|eval|flip|dec2base)')) )
xfor =
0
xrev =
54321
|
4 | Pass |
x = 9849;
y_correct = false;
assert( isequal(isNumPalindrome(x),y_correct) && isempty(regexp(evalc('type isNumPalindrome'),'(str|printf|eval|flip|dec2base)')) )
xfor =
0
xrev =
9489
|
Find relatively common elements in matrix rows
645 Solvers
Increment a number, given its digits
505 Solvers
Find best placement for ordered dominoes (harder)
194 Solvers
244 Solvers
325 Solvers