for Reverse function in C++ STL, let us say I want to reverse a row of a 2d array, then why will i write a[i] + n for the end point. (i represents row number)
Should it not be a[i] + n - 1, as the index for nth element is n-1? I know this is not the case but I want to know why.
In fact, when I wrote reverse( a[i], a[i] +1 ), there was no change in the array elements. Why so?
