Reverse Integer

Reverse digits of an integer.
Example1: x = 123, return 321
Example2: x = -123, return -321
click to show spoilers.
Have you thought about this?
Here are some good questions to ask before coding. Bonus points for you
if you have already thought through this!
If the integer's last digit is 0, what should the output be? ie, cases
such as 10, 100.
Did you notice that the reversed integer might overflow? Assume the
input is a 32-bit integer, then the reverse of 1000000003 overflows. How
should you handle such cases?
Throw an exception? Good, but what if throwing an exception is not an
option? You would then have to re-design the function (ie, add an extra
parameter).
 [leetcode] Reverse Words in a String [1]

Given an input string, reverse the string word by word.
For example,
Given s = "the sky is blue",
return "blue is sky the".

click to show clarification.

Clarification:
What constitutes a word?
A sequence of non-space characters constitutes a word.
Could the input string contain leading or trailing spaces?
Yes. However, your reversed string should not contain leading or
trailing spaces.
How about multiple spaces between two words?
Reduce them to a single space in the reversed string.
Revert "Reverse Integer"

This reverts commit 0264e8e1cd2151259059053bd421601070850685.