3 ms·
I generally don't use it too much myself because I agree it tends to add a bit of confusion. A tiny bit but still. I think that in that particular case the fac
by Timothee 15y ago
I generally don't use it too much myself because I agree it tends to add a bit of confusion. A tiny bit but still.
I think that in that particular case the fact the array[m] is used in the next line makes things not as obvious as they could be visually. I feel that the following requires less reading:
m -=1;
t = array[m];
array[m] = array[i];
array[i] = t;
To me, it's faster to parse.