solve min stack