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_0 ) {
    if ( var_0 == null || var_0 . length ( ) == 0 ) {
      return 0 ;
    }
    HashMap < Character , Integer > var_1 = new HashMap < Character , Integer > ( ) ;
    int var_2 = 0 ;
    int max = 0 ;
    for ( int var_3 = 0 ;
    var_3 < var_0 . length ( ) ;
    var_3 ++ ) {
      char var_4 = var_0 . charAt ( var_3 ) ;
      if ( var_1 . containsKey ( var_4 ) ) {
        if ( var_1 . get ( var_4 ) + 1 > var_2 ) {
          var_2 = var_1 . get ( var_4 ) + 1 ;
        }
      }
      var_1 . put ( var_4 , var_3 ) ;
      String var_5 = var_0 . substring ( var_2 , var_3 + 1 ) ;
      max = Math . max ( max , var_5 . length ( ) ) ;
    }
    return max ;
  }
  