leetcode 3.无重复字符的最长子串(javascript)
初版成果,耗时一小时,性能就不提了。。。好歹写出来了
var lengthOfLongestSubstring = function(s) {
let len = s.length;
if (len === 0) { return 0 }
let max = 0
for (let i = 0; i < len; i++) {
if (len-i < max) {break}
for (let j = i + 1; j <=
原创
2021-09-17 15:55:33 ·
73 阅读 ·
0 评论