Replies: 4 comments 1 reply
-
Maybe it's not a problem for them since they get tens of thousands of submissions every day (I guess). We can start by doing one or a few problems per day. |
Beta Was this translation helpful? Give feedback.
-
By doing this we can make local testing much more useful, instead of just a simple sanity check. |
Beta Was this translation helpful? Give feedback.
-
Haha, I've thought about this before, but I think it's beyond the goal of leetgo. It would introduce too much complexity. I believe 2-3 example test cases are enough to check the correctness in most cases. Yes, running the full test cases locally can ensure the solution will be accepted, but that's not our goal. leetgo aims to eliminate some tedious copy and paste work, rather than ensuring that the answer will be accepted. |
Beta Was this translation helpful? Give feedback.
-
I agree, that might be too far fetched. But I do think that, if we fetch the failed case from an unaccepted leetgo submission, it would help the user debug. Otherwise the user will need to copy and append that test case to the local testcases txt file. |
Beta Was this translation helpful? Give feedback.
-
We can get all test cases for a problem by trail-and-error and hardcoding.
We start by submitting a solution that returns a default value, then we get the first failed test case and the corresponding answer in return. We hardcode that test case into the solution, rinse and repeat until we get all the test cases.
Then we can store those test cases in a database for future usage, locally or somewhere online. Maybe even in this repo.
One downside is we might get banned for this.
Beta Was this translation helpful? Give feedback.
All reactions