7. Reverse Integer

Remembering the formula:

notice the boundary

time: O(n)

space: O(1)

Last updated

Was this helpful?