title: Finding the minimum number of swaps to convert one string to another, where the strings may have repeated characters
body: <p>I was looking through a programming question, when the following question suddenly seemed related.</p>
  
  <p>How do you convert a string to another string using as few swaps as follows. The strings are guaranteed to be interconvertible (they have the same set of characters, this is given), <strong>but the characters can be repeated</strong>. I saw web results on the same question, without the characters being repeated though.
  Any two characters in the string can be swapped. </p>
  
  <p>For instance : "aabbccdd" can be converted to "ddbbccaa" in two swaps, and "abcc" can be converted to "accb" in one swap.</p>
  
  <p>Thanks! </p>