n - 3
times, and n
is the length of your array.n - 3?
Because both pointers are initialized before the loop begins... And, do you remember the mirror? Well, that's the third.n - 3
times... However, for big arrays, the 3
doesn't produce a significant difference, so it is discarded.