Changing "int" to Integer gives significant performance improvement!

Правка en1, от vivekiitian, 2019-06-05 22:01:01

I tried to solve this problem. Refer to my solution 1 and 2. The only difference between those solutions is datatype int is replaced by Integer and solution got accepted (runtime got reduced from more than 1s to 140 ms). Any idea why is it happening?

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский vivekiitian 2019-06-05 22:02:10 2
en1 Английский vivekiitian 2019-06-05 22:01:01 490 Initial revision (published)