Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Memory Limit Exceeded" error (status 12) not covered in the submission result reporting code #146

Closed
dpkatz opened this issue Mar 13, 2025 · 2 comments

Comments

@dpkatz
Copy link
Contributor

dpkatz commented Mar 13, 2025

I was doing a dynamic programming problem in Python, and without thinking too much about it provided recursive code for the solution. When I ran leetcode-submit for the problem I never got anything back in the result buffer at all - no messages of any kind.

After a bit of digging it turned out that the solution failed on one of the tests because it hit the Python recursion depth limit, which manifests itself in the LeetCode API as status_code of 12 and status_msg of "Memory Limit Exceeded". However, it looks like the code in leetcode--show-submission-result doesn't handle this case at all - it simply swallows it.

I suggest that status_code: 12 be handled like the rest - with a report of what failed and the current test case. I'll submit a PR shortly to provide some useful status for this case - pretty much in parallel to the existing "Time Limit Exceeded" error.

@dpkatz
Copy link
Contributor Author

dpkatz commented Mar 13, 2025

I added a PR: #147

@dpkatz
Copy link
Contributor Author

dpkatz commented Mar 14, 2025

The PR got merged (thank you, @kaiwk!) and I've tested it. It all works, so closing the issue.

@dpkatz dpkatz closed this as completed Mar 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant