title: How to efficiently compare two vectors in C++, whose content can't be meaningfully sorted?
body: <p>How to efficiently compare two vectors in C++, whose content can't be meaningfully sorted?</p>
  
  <p>I read many posts but most talk about first sorting the two vectors and then comparing
  the elements. But in my case I can't sort the vectors in a meaningful way that can
  help the comparison. That means I will have to do an O(N^2) operation rather than O(N),
  I will have to compare each element from the first vector and try to find a unique match
  for it in the second vector. So I will have to match up all the elements and if I can
  find a unique match for each then the vectors are equal.</p>
  
  <p>Is there an efficient and simple way to do this? Will I have to code it myself?</p>
  
  <p>Edit: by <strong>meaningful sorting</strong> I mean a way to sort them so that later you can
  compare them in linear fashion.</p>
  
  <p>Thank you</p>