<awangdev>Longest Substring Without Repeating Characters_4.java
public int lengthOfLongestSubstring(String s) {
    	if (s == null || s.length() == 0) {
    		return 0;
    	}
    	HashMap<Character, Integer> map = new HashMap<Character, Integer>();
    	int count = 0;
    	int max = 0;
    	for (int i = 0; i < s.length(); i++) {
    		if (!map.containsKey(s.charAt(i))) {
    			map.put(s.charAt(i), i);
    			count++;
    		} else {
    			i = map.get(s.charAt(i));
    			map = new HashMap<Character, Integer>();
    			count = 0;
    		}
    		max = Math.max(max, count);
    	}

    	return max;
    }
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 ++ ) {
    if ( ! var_8 . containsKey ( var_1 . charAt ( var_11 ) ) ) {
      var_8 . put ( var_1 . charAt ( var_11 ) , var_11 ) ;
      var_9 ++ ;
    }
    else {
      var_11 = var_8 . get ( var_1 . charAt ( var_11 ) ) ;
      var_8 = new HashMap < Character , Integer > ( ) ;
      var_9 = 0 ;
    }
    max = Math . max ( max , var_9 ) ;
  }
  return max ;
}
