A Number After a Double Reversal LeetCode solution in C++

1
class Solution {
2
public:
3
bool isSameAfterReversals(int num) {
4
return num == 0 || num % 10 > 0; // All you have to do is check the Trailing zeros
5
}
6
};

0

WPM •0 •0

100%

ACC •0 •0

0s

TIME •0