Solution for Stack with min value in o[1]