title: Sort and keep track of elements
body: <p>Just to know, I'm talking C++ now.</p>
  
  <p>Suppose I have an array <code>A = {4, 1, 5, 2, 3}</code> and sort it in <code>A_sorted = {1, 2, 3, 4, 5}</code>. I would like to keep the following information: where is now element <code>e</code> (from array A) in the sorted array A_sorted? e.g.: element with index 2 in A (<code>5</code>) has now index 4 in A_sorted.</p>
  
  <p>The question is more like: can one use STL to achieve this?</p>