Does anyone pass this problem with Java solution without issue of not finding top()?

  • 2

    Hi all, my code was in Java and I encountered the problem of cannot finding the top() in line 26. And I just copied the java solution posted already, and they cannot be accepted because of the same problem. Is there a possibility that the online judgement of java solution is wrong?

  • 0

    Same issue with my code. I commented the whole code, submitting empty code, still throwing the same error. Strange.

  • 0

    I think this is the problem of the online judgement

  • 0

    Thanks for your feedback. I have just fixed this issue. Please rename the Java class name to MyStack and try submitting again, your program should get Accepted.

Log in to reply

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