Last updated
Was this helpful?
Last updated
Was this helpful?
Given a 32-bit signed integer, reverse digits of an integer.
Example 1:
Example 2:
Example 3:
One solution is to convert number to string and then handle trailing 0s. Anyway, here is a solution that uses division and multiplication.