Category "unordered"

shrink_to_fit() for unordered containers?

I am wondering two things... Does it make any sense to resize an unordered containers in a manner similar to shrink_to_fit() once the container has been filled

How can I save the original index after sorting a list?

Let's say I have the following array: a = [4,2,3,1,4] Then I sort it: b = sorted(A) = [1,2,3,4,4] How could I have a list that map where each number was,