Huge "Running Time" Difference in Identical Codes (LeetCode Online Judge)

Правка en8, от vok8, 2020-05-27 19:45:23

  • Submission-1: Link (AC - 856 ms)


  • Submission-2: Link (AC - 1824 ms)


Code

  • The code in the above 2 submissions is wholly same/identical (Not even a single bit in the codes is differing).

  • I ain't getting what could be the reason of such a huge time difference between the running time of fully identical codes. I mean, 30-100 ms difference is fine, as that can be there, due to server load and/or some other server related stuff. But, the difference is ~1 second, which seems very weird and strange.

  • For checking the correctness of what I have experienced, you can try submitting the above code 2-3 times continuously, after some 2-3 min stretch. I think, you will get my doubt perfectly, then!

  • Can someone please explain, what can be the reason behind this huge "running time" difference?

  • Thank you!

Теги #weird, #strange, #leetcode, #time, #identical

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en11 Английский vok8 2020-05-27 21:27:19 123
en10 Английский vok8 2020-05-27 21:25:30 3 Tiny change: ' summary="Code">\n~~' -> ' summary="My Code">\n~~'
en9 Английский vok8 2020-05-27 19:47:02 25 Tiny change: 'in stretch. I think,' -> 'in stretch, between each submission. I think,'
en8 Английский vok8 2020-05-27 19:45:23 28
en7 Английский vok8 2020-05-27 19:42:10 292
en6 Английский vok8 2020-05-27 19:39:16 3254
en5 Английский vok8 2020-05-27 18:27:54 1 Tiny change: ' Thank you' -> ' Thank you!'
en4 Английский vok8 2020-05-27 18:27:43 1 Tiny change: ' Thank you!' -> ' Thank you'
en3 Английский vok8 2020-05-26 13:26:31 1 Tiny change: 'n the code is differ' -> 'n the codes is differ'
en2 Английский vok8 2020-05-26 13:15:23 2
en1 Английский vok8 2020-05-26 12:58:13 948 Initial revision (published)