Create minimum in a stack in O(1)

It gives the minimum in a stack at a given position in O(1) time.