public static  int lengthOfLongestSubstring(String s){
		int length=0;
		HashMap<Character, Integer> hm=new HashMap<>();
		for(int i=0;i< s.length();i++){
			if(!hm.containsKey(s.charAt(i)))
				hm.put(s.charAt(i),i);
			else{
				length=length>hm.size()?length:hm.size();
				i=hm.get(s.charAt(i));
				hm.clear();
			}
		}
		return Math.max(length, hm.size());
	}