title: Counting the number of common chars in a string and a vector of strings
body: <p>My problem is how to count but not count the same character twice. Like comparing 'aba' to 'are' should give 1 as result since it has only one char in common.</p>
  
  <p>This is where I got so far:</p>
  
  <pre><code>public int sameChars (Vector&lt;String&gt; otherStrs){
      int result = 0;
      String original = "aba";
      for (int h= 0; h&lt; otherStrs.size(); h++) {
          String targetStr = otherStrs.get(h);
          for (int i=0; i&lt; original.length(); i++) {
              char aux = original.charAt(i);
              for (int j=0; j&lt; Math.min(original.length(), targetStr.length()); j++) {
                  char targetAux = targetStr.charAt(j);
                  if (aux == targetAux) {
                      result++;
                      break;
                  }
              }
          }
      }
      return result;
  }
  </code></pre>
  
  <p>Ideas are welcome, thanks.</p>