Design a stack that supports push, pop, top, and retrieving the minimum
element in constant time.

push(x) -- Push element x onto stack.
pop() -- Removes the element on top of the stack.
top() -- Get the top element.
getMin() -- Retrieve the minimum element in the stack.
Given an input string, reverse the string word by word.

For example,
Given s = "the sky is blue",
return "blue is sky the". 

Clarification:

1. What constitutes a word?
    A sequence of non-space characters constitutes a word.
2. Could the input string contain leading or trailing spaces?
    Yes. However, your reversed string should not contain leading or
trailing spaces.
3. How about multiple spaces between two words?
    Reduce them to a single space in the reversed string.
Suppose a sorted array is rotated at some pivot unknown to you
beforehand.

(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).

Find the minimum element.

You may assume no duplicate exists in the array.