get minimum of stack in o(1)