I call my algorithm with
quicksort(the_vector.begin(), the_vector.end())
I see that __last variable points to a memory location that is one more than the end of the vector. i.e If I declare a vector of size 10 like vector<int> the_vector(10), __last points to the eleventh element. For a vector<int> the_vector(2), __last points to the 3rd element.
I can modify my algorithm to handle this. But is it true for all container classes? like, will map.end() point to a memory location that is more than the actual map size?