Ambiguous judgement in july-leetcoding-challenge

Comments

1 comment

  • Official comment
    lc_pam

    Hi sakship31

    Thank you for reaching out to us! I believe I've responded to you via a different support channel but I'd love to provide the explanation here as well.
    Regarding your first question about why submission failed but run code finished. When you submit your code, Leetcode's judge runs all 596 test cases and it returns Time Limit Exceeded because your code is not able to finish all test cases in a limited time. However, when you run custom test cases, there are only five test cases provided which your code is able to run through all cases in time. 

    Regarding your second question about receiving passed test cases variation, it’s a very difficult and ongoing research to evaluate the program’s runtime and get the same value for different runs of the same program. We have tried our best to make sure we isolate your program’s runtime, but there exist a lot of factors that makes it extremely hard to quantify the runtime correctly.

    The significance of program’s runtime we're providing to you is so that you can compare your code with the peaks in the graph, where programs that have different time complexities like O(n), O(n^2) would be around different peaks (at least in most of the cases). Other factors include compiler changes, optimizations, and more features that our developers keep on working on to provide better UX. These factors all also affect the runtime of the same program, introducing some level of discrepancy.

    I hope this explanation answers your doubts. If you have any other questions, please don't hesitate to let us know.

    Best,
    Christina

    Comment actions Permalink

Please sign in to leave a comment.