Блог пользователя vok8

Автор vok8, история, 4 года назад, По-английски

  • Submission-1: (AC - 856 ms)


  • Submission-2: (AC - 1824 ms)


The 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, between each submission. 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!

  • Проголосовать: нравится
  • +21
  • Проголосовать: не нравится

»
4 года назад, # |
  Проголосовать: нравится +14 Проголосовать: не нравится

Please share ideone link to the submissions, the above link doesn't work.

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Hey, sorry for that!

    I didn't know, LeetCode doesn't allow the submission link to be opened/accessed by any other LeetCode user.

    I have added my code and the screenshots of the "running time" for both the submissions, above.