comefrom: <awangdev>Longest Substring Without Repeating Characters_3.java
code: public int lengthOfLongestSubstring(String s) {
          if (s == null || s.length() == 0) {
              return 0;
          }
          HashMap<Character, Integer> map = new HashMap<Character, Integer>();
          int head = 0;
          int max = 0;
          for (int i = 0; i < s.length(); i++) {
              char c = s.charAt(i);
              if (map.containsKey(c)) {
                  if (map.get(c) + 1 > head) {
                      head = map.get(c) + 1;
                  }
              }
              map.put(c, i);
              String str = s.substring(head, i + 1);
              max = Math.max(max, str.length());
          }
          return max;
      }
masked: public int sample_funcname ( String var_1 ) {
    if ( var_1 == null || var_1 . length ( ) == 0 ) {
      return 0 ;
    }
    HashMap < Character , Integer > var_8 = new HashMap < Character , Integer > ( ) ;
    int var_9 = 0 ;
    int max = 0 ;
    for ( int var_11 = 0 ;
    var_11 < var_1 . length ( ) ;
    var_11 ++ ) {
      char var_13 = var_1 . charAt ( var_11 ) ;
      if ( var_8 . containsKey ( var_13 ) ) {
        if ( var_8 . get ( var_13 ) + 1 > var_9 ) {
          var_9 = var_8 . get ( var_13 ) + 1 ;
        }
      }
      var_8 . put ( var_13 , var_11 ) ;
      String var_19 = var_1 . substring ( var_9 , var_11 + 1 ) ;
      max = Math . max ( max , var_19 . length ( ) ) ;
    }
    return max ;
  }
  