title: Why is the C++ sort range [first, last)?
body: <p>Maybe they want to help us, considering that arrays start at 0. So we might think that if we want to sort the first n elements, we go all the way to v[n] but in reality we only go to v[n-1].  So that would explain the fact that the function sorts up to last - 1. But in this case why doesn't it start at first - 1? At the begging we put 1 and we start from v[1] but then we put n and stop at v[n-1]. Why? If it would consider arrays indeed from one, it should include the last element. These are just my - probably stupid - thoughts? This is why I would appreciate a true explanation. Thanks!</p>
  
  <p>Edit: Thank you all so much for your answers. I can see there are many advantages and everything looks more normal in this range. I will try to remember all your examples to make it clear in my mind.</p>