3 ms·
Surely that's less clear than "Swap( rev[i], rev[iLen - 1 - i] );"? And yes, the compiler would optimize out "iLen / 2", computing it once rather than every it
by palish 16y ago
Surely that's less clear than "Swap( rev[i], rev[iLen - 1 - i] );"?
And yes, the compiler would optimize out "iLen / 2", computing it once rather than every iteration.