comefrom: <gouthampradhan>string_FindWordsThatCanBeFormedbyCharacters_1.java
code: public int countCharacters(String[] words, String chars) {
      Map<Character, Integer> countMap = new HashMap<>();
      for (char c : chars.toCharArray()) {
        countMap.putIfAbsent(c, 0);
        countMap.put(c, countMap.get(c) + 1);
      }
      int ans = 0;
      for (String s : words) {
        Map<Character, Integer> subMap = new HashMap<>();
        for (char c : s.toCharArray()) {
          subMap.putIfAbsent(c, 0);
          subMap.put(c, subMap.get(c) + 1);
        }
        boolean possible = true;
        for (char k : subMap.keySet()) {
          if (!countMap.containsKey(k) || subMap.get(k) > countMap.get(k)) {
            possible = false;
            break;
          }
        }
        if (possible) {
          ans += s.length();
        }
      }
      return ans;
    }
masked: public int sample_funcname ( String [ ] var_0 , String var_1 ) {
    Map < Character , Integer > var_2 = new HashMap < > ( ) ;
    for ( char var_3 : var_1 . toCharArray ( ) ) {
      var_2 . putIfAbsent ( var_3 , 0 ) ;
      var_2 . put ( var_3 , var_2 . get ( var_3 ) + 1 ) ;
    }
    int var_4 = 0 ;
    for ( String var_5 : var_0 ) {
      Map < Character , Integer > var_6 = new HashMap < > ( ) ;
      for ( char var_3 : var_5 . toCharArray ( ) ) {
        var_6 . putIfAbsent ( var_3 , 0 ) ;
        var_6 . put ( var_3 , var_6 . get ( var_3 ) + 1 ) ;
      }
      boolean var_8 = true ;
      for ( char var_7 : var_6 . keySet ( ) ) {
        if ( ! var_2 . containsKey ( var_7 ) || var_6 . get ( var_7 ) > var_2 . get ( var_7 ) ) {
          var_8 = false ;
          break ;
        }
      }
      if ( var_8 ) {
        var_4 += var_5 . length ( ) ;
      }
    }
    return var_4 ;
  }
  