Test case 7? It doesn't make sense.

  • 1

    Input: push(-1),top,getMin

    Output: [-1,-3]
    Expected: [-1,-1]

    How come my program outputs -3? I don't have any hard-coded stuff in my program.

    I use python.

    Any idea?

  • 0

    I have the same issue. I tested my code on my PC and it does return [-1,-1]. There must be something odd with Test case 7.

  • 0

    btw, I wrote the same code in C++ and it works. Try it out. Good luck!

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.