Update stack.cpp

Updated Min() function with the complexity of O(1)