4ms C code in 12 lines
int lengthOfLongestSubstring(char* s)\n    {\n    \tint len=0;\n        char *end=s,*temp;\n    \tchar* addressTable[128]={NULL};\n    \twhile(*end){\n    \t\tt
    int lengthOfLongestSubstring(char* s)\n    {\n    \tint len=0;\n        char *end=s,*temp;\n    \tchar* addressTable[128]={NULL};\n    \twhile(*end){\n    \t\ttemp = addressTable[*end];\n    \t\taddressTable[*end]=end;\n    \t\tif(temp>=s){\n    \t\tlen=end-s>len?end-s:len;\n    \t\ts = temp+1;\n    \t\t}end++;\n    \t}\n    \tlen=end-s>len?end-s:len;\n    \treturn len;\n    }
[]