Time taken by solution is reduced without any reason!


  • 0
    K

    I was doing some problem and my answer got accepted. In "detailed analysis" of it, I found my answer to be among the fastest JAVA solutions (in the Graph). I got excited, but later I found same for another question, which led me to doubt it. Then I checked my old submissions for any other question. Time taken by it was 432ms earlier, when I submitted it last time. Then all I did was resubmit the same answer and it took 212ms time. Now in the same question, I am way ahead of all other JAVA submissions (in Graph).

    I am just curious what is happening here. I did not know in which category I should put it, so I selected the latest question. Thanks.


  • 2
    S

    The actual time taken to execute your code varies at the mercy of multiple factors; the server may encounter a temporary lag or heavy computation load, for instance. I would say don't worry too much about the numbers. Instead, please instead on the analysis of time / space complexity and the clarity of implementation, which matter way more in a real interview.


Log in to reply
 

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