Longest Substring Without Repeating Characters

链接

class Solution {
    public int lengthOfLongestSubstring(String s) {
        int n = s.length();
        if (n==0) return 0;
        
        HashMap map = new HashMap();
        
        int ans = 0;
        
        for(int i= 0,j=0;i

你可能感兴趣的:(Longest Substring Without Repeating Characters)