comefrom: <awangdev>Palindrome Permutation II_1.java
code: public void permutateUnique(List<String> rst, String str, boolean[] visited, String s) {
          if (str.length() == s.length()) {
              rst.add(str);
              return;
          }
          for (int i = 0; i < s.length(); i++) {
              if (visited[i] || (i > 0 && !visited[i - 1] && s.charAt(i - 1) == s.charAt(i))) {
                  continue;
              }
              visited[i] = true;
              permutateUnique(rst, str + s.charAt(i), visited, s);
              visited[i] = false;
          }
      }
masked: public void sample_funcname ( List < String > rst , String str , boolean [ ] visited , String s ) {
    if ( str . length ( ) == s . length ( ) ) {
      rst . add ( str ) ;
      return ;
    }
    for ( int i = 0 ;
    i < s . length ( ) ;
    i ++ ) {
      if ( visited [ i ] || ( i > 0 && ! visited [ i - 1 ] && s . charAt ( i - 1 ) == s . charAt ( i ) ) ) {
        continue ;
      }
      visited [ i ] = true ;
      permutateUnique ( rst , str + s . charAt ( i ) , visited , s ) ;
      visited [ i ] = false ;
    }
  }
  