3 ms·
The latter only adds small numbers to the small_numbers[] array. The former preliminarily adds all numbers to the array but only keeps the small ones. As long
by peterfirefly 4mo ago
The latter only adds small numbers to the small_numbers[] array.
The former preliminarily adds all numbers to the array but only keeps the small ones.
As long as you don't look at the small_numbers[smlen] element after the loop, they behave identically.